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.
I am trying to make the library and I am getting the following warnings when compiling:
I am not sure how to fix this issue. Any help would be appreciated.