alsa-project/alsa-utils issue #17 was opened from kloczek:
It would be good to clean this :) <pre>alsactl.c: In function 'main': alsactl.c:345:3: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result [-Wunused-result] 345 | daemon(0, 0); | ^~~~~~~~~~~~ utils.c: In function 'initfailed': utils.c:95:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] 95 | write(fp, str, strlen(str)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ utils.c:96:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] 96 | write(fp, ":", 1); | ^~~~~~~~~~~~~~~~~ utils.c:97:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] 97 | write(fp, reason, strlen(reason)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ utils.c:98:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] 98 | write(fp, ":", 1); | ^~~~~~~~~~~~~~~~~ utils.c:99:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] 99 | write(fp, sexitcode, strlen(sexitcode)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ utils.c:100:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] 100 | write(fp, "\n", 1); | ^~~~~~~~~~~~~~~~~~ Note: Writing alsactl_init.7 mem.c: In function 'casprintf': mem.c:63:6: warning: implicit declaration of function 'vasprintf'; did you mean 'casprintf'? [-Wimplicit-function-declaration] 63 | if (vasprintf(&str, fmt, ap) < 0) | ^~~~~~~~~ | casprintf utils.c:19: warning: "_XOPEN_SOURCE" redefined 19 | #define _XOPEN_SOURCE | <command-line>: note: this is the location of the previous definition volume_mapping.c: In function 'get_normalized_volume': volume_mapping.c:116:15: warning: implicit declaration of function 'exp10' [-Wimplicit-function-declaration] 116 | normalized = exp10((value - max) / 6000.0); | ^~~~~ volume_mapping.c:116:15: warning: incompatible implicit declaration of built-in function 'exp10' volume_mapping.c: In function 'set_normalized_volume': volume_mapping.c:151:14: warning: incompatible implicit declaration of built-in function 'exp10' 151 | min_norm = exp10((min - max) / 6000.0); | ^~~~~ ../alsamixer/volume_mapping.c: In function 'get_normalized_volume': ../alsamixer/volume_mapping.c:116:15: warning: implicit declaration of function 'exp10' [-Wimplicit-function-declaration] 116 | normalized = exp10((value - max) / 6000.0); | ^~~~~ ../alsamixer/volume_mapping.c:116:15: warning: incompatible implicit declaration of built-in function 'exp10' ../alsamixer/volume_mapping.c: In function 'set_normalized_volume': ../alsamixer/volume_mapping.c:151:14: warning: incompatible implicit declaration of built-in function 'exp10' 151 | min_norm = exp10((min - max) / 6000.0); | ^~~~~ amidi.c: In function 'main': amidi.c:692:5: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] 692 | write(receive_file, buf, length); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ alsaloop.c: In function 'parse_config': alsaloop.c:398:6: warning: variable 'arg_effect' set but not used [-Wunused-but-set-variable] 398 | int arg_effect = 0; | ^~~~~~~~~~ aseqnet.c: In function 'flush_writebuf': aseqnet.c:495:5: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] 495 | write(netfd[i], writebuf, cur_wrlen); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ </pre>
Issue URL : https://github.com/alsa-project/alsa-utils/issues/17 Repository URL: https://github.com/alsa-project/alsa-utils