Skip to content

Compilation Warnings when building CPP library #364

@bhvima

Description

@bhvima

I am trying to make the library and I am getting the following warnings when compiling:

../../source/c_pwm.c: In function ‘pwm_setup’:
../../source/c_pwm.c:478:25: warning: ‘strncpy’ output may be truncated copying 250 bytes from a string of length 299 [-Wstringop-truncation]
                         strncpy(pwm_path, ecap_path_udev, sizeof(pwm_path));
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../source/c_adc.c: In function ‘initialize_adc’:
../../source/c_adc.c:58:9: warning: ‘strncat’ specified bound 49 equals destination size [-Wstringop-overflow=]
         strncat(adc_prefix_dir, "/sys/bus/iio/devices/iio:device0/in_voltage", sizeof(adc_prefix_dir));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I am not sure how to fix this issue. Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy