I just made a test and, for sure, clang warns about unused variables:
$ clang -Wunused-variable -I/usr/include/re -I/usr/include/baresip -lbaresip -lrem -lre baresip.c baresip.c:48:6: warning: unused variable 'unused' [-Wunused-variable] int unused; ^ 1 warning generated.
-- Juha
Juha
I think your mail was intended for the baresip mailing list. There is no baresip.c in Kamailio
With best regards
Florian Floimair Innovation - Software-Development
COMMEND INTERNATIONAL GMBH A-5020 Salzburg, Saalachstraße 51 http://www.commend.com http://www.commend.com/
Security and Communication by Commend
FN 178618z | LG Salzburg
Am 02.10.18, 12:39 schrieb "sr-users im Auftrag von Juha Heinanen" <sr-users-bounces@lists.kamailio.org im Auftrag von jh@tutpro.com>:
I just made a test and, for sure, clang warns about unused variables:
$ clang -Wunused-variable -I/usr/include/re -I/usr/include/baresip -lbaresip -lrem -lre baresip.c baresip.c:48:6: warning: unused variable 'unused' [-Wunused-variable] int unused; ^ 1 warning generated.
-- Juha
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Floimair Florian writes:
I think your mail was intended for the baresip mailing list. There is no baresip.c in Kamailio
I just wanted to check if it is really so that clang doesn't generate unused compiler warnings. Any C source is OK for that test and I just happened to have baresip.c around.
clang does not produce unused var warnings without -Wunused-variable, which means that that flag needs to be added to K Makefile.
-- Juha
On 02.10.18 13:05, Juha Heinanen wrote:
Floimair Florian writes:
I think your mail was intended for the baresip mailing list. There is no baresip.c in Kamailio
I just wanted to check if it is really so that clang doesn't generate unused compiler warnings. Any C source is OK for that test and I just happened to have baresip.c around.
clang does not produce unused var warnings without -Wunused-variable, which means that that flag needs to be added to K Makefile.
To close this: the compile flag was added to Makefile for clang compiler.
Cheers, Daniel