[Xastir-dev] Proposal to clean up some warnings
Jerry Dunmire
jerry at dunmire.org
Wed Jun 9 13:27:37 EDT 2010
Hi,
While working on the OSM patch I noticed that the compile produces a
lot of warnings and I would like to try and reduce the number a bit.
The first one I would like to tackle is:
warning: format not a string literal and no format arguments
This warning arises when xastir_snprintf() is used with only three
arguments. For example: main.c:1483-
xastir_snprintf(temp_label_string,
sizeof(temp_label_string),
langcode("SMARTB004") );
The underlying operation in this case seems to devolve to a strncpy()
and I would like to eliminate the warning by directly replacing
xastri_snprintf() with strncpy() in these cases. Of course the last
two arguments will need to be swapped.
Does anyone have a problem with this change?
73,
...jerry
KA6HLD
More information about the Xastir-dev
mailing list