Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings from gcc 8.2 in Debian 10 (Buster) #321

Merged
merged 7 commits into from
Dec 17, 2019
Merged

Fix warnings from gcc 8.2 in Debian 10 (Buster) #321

merged 7 commits into from
Dec 17, 2019

Commits on Dec 6, 2019

  1. Fix warning about casting incompatible function types #308

    Debian 10 (Buster) has gcc 8.2 which warns about:
    
    cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’
    
    The solution is to cast to '(PyCFunction)(void *)'
    pdp7 committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    7032af7 View commit details
    Browse the repository at this point in the history
  2. Fix warning print format strings being truncated #308

    Debian 10 (Buster) has gcc 8.2 which warns about:
    
    error: ‘%s’ directive output may be truncated writing up to 19 bytes into a region of size between 10 and 59 [-Werror=format-truncation=]
      snprintf(path, sizeof(path), "%s/%s/state", ocp_dir, pinmux_dir);
    pdp7 committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    9298393 View commit details
    Browse the repository at this point in the history
  3. Fix warning about casting incompatible function types #308

    Debian 10 (Buster) has gcc 8.2 which warns about:
    
    cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’
    
    The solution is to cast to '(PyCFunction)(void *)'
    pdp7 committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    3a5d23d View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2019

  1. Fix warnings on format truncation and sizeof in strncpy #308

    Debian 10 (Buster) has gcc 8.2 which warns about:
    
    source/c_pwm.c:459:65: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
    source/c_pwm.c:396:43: error: ‘%s’ directive output may be truncated writing up to 199 bytes into a region of size 100 [-Werror=format-truncation=]
    pdp7 committed Dec 11, 2019
    Configuration menu
    Copy the full SHA
    7fb13f9 View commit details
    Browse the repository at this point in the history
  2. Fix warning about casting incompatible function types #308

    Debian 10 (Buster) has gcc 8.2 which warns about:
    
    cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’
    
    The solution is to cast to '(PyCFunction)(void *)'
    pdp7 committed Dec 11, 2019
    Configuration menu
    Copy the full SHA
    eca84d6 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2019

  1. Update travis config to specify Python 3.6

    Attempt to fix Travis error:
    https://travis-ci.com/adafruit/adafruit-beaglebone-io-python/builds/140636005
    
    ```
    1.74s$ git clone --depth=50 --branch=issue308 https://github.com/adafruit/adafruit-beaglebone-io-python.git adafruit/adafruit-beaglebone-io-python
    0.01s0.01s$ source ~/virtualenv/python3.6/bin/activate
    $ python --version
    Python 3.6.7
    $ pip --version
    pip 19.0.3 from /home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pip (python 3.6)
    install
    1.54s$ pip install tox
    5.96s$ tox
    GLOB sdist-make: /home/travis/build/adafruit/adafruit-beaglebone-io-python/setup.py
    py27 create: /home/travis/build/adafruit/adafruit-beaglebone-io-python/.tox/py27
    py27 inst: /home/travis/build/adafruit/adafruit-beaglebone-io-python/.tox/.tmp/package/1/Adafruit_BBIO-1.1.1.zip
    py27 installed: Adafruit-BBIO==1.1.1
    py27 run-test-pre: PYTHONHASHSEED='645938357'
    py27 run-test: commands[0] | echo 'run pytest on beaglebone'
    run pytest on beaglebone
    py34 create: /home/travis/build/adafruit/adafruit-beaglebone-io-python/.tox/py34
    ERROR: InterpreterNotFound: python3.4
    ___________________________________ summary ____________________________________
      py27: commands succeeded
    ERROR:  py34: InterpreterNotFound: python3.4
    The command "tox" exited with 1.
    Done. Your build exited with 1.
    ```
    pdp7 authored Dec 17, 2019
    1 Configuration menu
    Copy the full SHA
    1ca2830 View commit details
    Browse the repository at this point in the history
  2. Update tox.ini to Python 3.6

    Try to fix TravisCI error that Python 3.4 does not exist
    pdp7 authored Dec 17, 2019
    Configuration menu
    Copy the full SHA
    59dcd95 View commit details
    Browse the repository at this point in the history