When I try to compile 0.40.0 on NixOS, I get:
``
[1067/1121] Compiling src/LV2/xputty/xadjustment.cpp
../src/LV2/xputty/xfilepicker.cpp: In function 'void fp_init(FilePicker, const char)':
../src/LV2/xputty/xfilepicker.cpp:194:37: error: format not a string literal and no format arguments [-Werror=format-security]
194 | asprintf(&filepicker->path, path);
| ^
../src/LV2/xputty/xfilepicker.cpp: In function 'int fp_get_files(FilePicker, char, int)':
../src/LV2/xputty/xfilepicker.cpp:157:21: warning: ignoring return value of 'int asprintf(char, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
157 | asprintf(&filepicker->file_names[filepicker->file_counter++],"%s",dp->d_name);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/LV2/xputty/xfilepicker.cpp:166:21: warning: ignoring return value of 'int asprintf(char, const char, ...)', declared with attribute warn_unused_result [-Wunused-result]
166 | asprintf(&filepicker->dir_names[filepicker->dir_counter++], (strcmp(path, PATH_SEPARATOR) != 0) ?
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167 | "%s" PATH_SEPARATOR "%s" : "%s%s" , path,dp->d_name);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/LV2/xputty/xfilepicker.cpp: In function 'int fp_prefill_dirbuffer(FilePicker, char)':
../src/LV2/xputty/xfilepicker.cpp:105:17: warning: ignoring return value of 'int asprintf(char, const char, ...)', declared with attribute warn_unused_result [-Wunused-result]
105 | asprintf(&filepicker->dir_names[filepicker->dir_counter++], "%s",path);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/LV2/xputty/xfilepicker.cpp:109:17: warning: ignoring return value of 'int asprintf(char, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
109 | asprintf(&ho, "%s",path);
| ~~~~~~~~^~~~~~~~~~~~~~~~
../src/LV2/xputty/xfilepicker.cpp:115:21: warning: ignoring return value of 'int asprintf(char, const char, ...)', declared with attribute warn_unused_result [-Wunused-result]
115 | asprintf(&filepicker->dir_names[filepicker->dir_counter++], "%s",dirname(ho));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/LV2/xputty/xfilepicker.cpp:123:21: warning: ignoring return value of 'int asprintf(char, const char, ...)', declared with attribute warn_unused_result [-Wunused-result]
123 | asprintf(&filepicker->dir_names[filepicker->dir_counter++], "%s",path);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/LV2/xputty/xfilepicker.cpp: In function 'void fp_init(FilePicker, const char)':
../src/LV2/xputty/xfilepicker.cpp:194:13: warning: ignoring return value of 'int asprintf(char*, const char, ...)', declared with attribute warn_unused_result [-Wunused-result]
194 | asprintf(&filepicker->path, path);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
Waf: Leaving directory `/tmp/nix-build-guitarix-0.40.0.drv-0/guitarix-0.40.0/build'
Build failed
``
Anonymous
The error is fixed in git,
Here is the patch:
https://sourceforge.net/p/guitarix/git/ci/2609ca1406fdfea01c00bf2415c446189009b557/
Thank you!