compiler warnings
andreas moroder
claudiamoroder at st-ulrich.suedtirol.net
Sun Oct 7 07:08:03 GMT 2001
Hello
I added a few warning flags to my Makefile and got lot of them. Few of them
look really like errors:
intl/lang_tdb.c: In function `load_po':
---> intl/lang_tdb.c:31: warning: `msgid' might be used uninitialized in this
function
in effect few lines later..
for (i=0;i<num_lines;i++) {
if (strncmp(lines[i], "msgid \"", 7) == 0) {
msgid = lines[i] + 7;
}
if (strncmp(lines[i], "msgstr \"", 8) == 0) {
msgstr = lines[i] + 8;
trim_string(msgid, NULL, "\"");
msgid may be passed to trim_string unitialized. May be that the compiler
initializes the pointer to NULL, but it don't know if this is allways true.
libsmb/libsmbclient.c: In function `smbc_telldir':
libsmb/libsmbclient.c:2181: warning: cast from pointer to integer of
different size
This confirms the posting "libsmbclient off_t size problem" of Tom Jansen
What about the warning about not used variables ?
Would it not be better to set as default more warnings in the head Makefile ?
Bye
Andreas
More information about the samba-technical
mailing list