]> git.tuebingen.mpg.de Git - paraslash.git/commit
Compile with -Wsuggest-attribute=malloc.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 30 May 2023 22:11:14 +0000 (00:11 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 24 Dec 2023 21:37:00 +0000 (22:37 +0100)
commit914ee19c1fd21834fe5f81260daafe76a4475290
tree66bc08ab66207564a3b4aa220bc0b4c321460e98
parentb67136cea57eda7551f2eeaf388e3de02a1b38b5
Compile with -Wsuggest-attribute=malloc.

We already employ this attribute extensively to help the compiler
improve optimization. However, a few malloc-like functions were not
yet marked with __malloc. Fix that and enable the warning to make
sure that new malloc-like functions get marked.

Since not all supported compilers know about this warning option, we
need to check at compile time whether the option is supported. Thanks
to the existing cc-option make(1) function, this is a simple one-liner
for Makefile.real.
Makefile.real
audiod.c
audiod.h
mp4.c
mp4.h
net.c
net.h
ogg_afh_common.c
ogg_afh_common.h
send.h
send_common.c