Awn

"format not a string literal and no format arguments" errors in main.c

Bug #311321 reported by Adam Williamson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Awn
Fix Released
Low
Mark Lee
Mandriva
New
Undecided
Unassigned

Bug Description

Building 0.2.6 (but I had a quick look and current 0.2 branch doesn't seem to have changed the relevant code), with -Werror=format-security , you get:

gcc -DHAVE_CONFIG_H -I. -I.. -pthread -DORBIT2=1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gnome-desktop-2.0 -I/usr/include/startup-notification-1.0 -I/usr/include/libgnome-2.0 -I/usr/include/orbit-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-vfs-2.0 -I/usr/lib64/gnome-vfs-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/gnome-vfs-module-2.0 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wall -fno-strict-aliasing -fmessage-length=0 -D_FORTIFY_SOURCE=2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
main.c: In function '_awn_plug_new':
main.c:220: error: format not a string literal and no format arguments
main.c: In function 'launch_python':
main.c:288: warning: format '%lld' expects type 'long long int', but argument 4 has type 'gint64'
main.c:292: error: format not a string literal and no format arguments

these are coding errors and should be fixed, as I understand it. I know how to fix some simple instances of this error, but these don't seem to fit the template, so I'm just reporting it for you guys to fix. Thanks.

Revision history for this message
Mark Lee (malept) wrote :

Thanks for reporting this. I'll see if I can take a look at this sometime this week.

Changed in awn:
assignee: nobody → malept
importance: Undecided → Low
milestone: none → 0.2.8
status: New → Confirmed
Revision history for this message
haytjes (h4writer) wrote :

Fix is committed into trunk r495 and r496,
so errors and warnings shouldn't appear on compiling.

Changed in awn:
status: Confirmed → Fix Committed
moonbeam (rcryderman)
Changed in awn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.