Format warnings in src/libnrtype/Layout-TNG-Output.cpp
Bug #1278049 reported by
Kris
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Low
|
Kris |
Bug Description
Current trunk (r13012) shows format compiler warnings because the z modifier does not exist for printf related functions. Attached is a patch that gets rid of the warnings and makes more immediate usage of glib::ustring functionality (as internediate step to drop all printf related functions in favor of glib::ustring). I do not know where I could see the result of Layout:
To post a comment you must log in.
Patch tested on Windows XP, Inkscape trunk revision 13012. No more compiler warnings.
Grep tells us that Layout: :dumpAsText( ) is currently commented everywhere it is written: inkscape- 13012>grep -H -r "dumpAsText" src Layout- TNG-Output. cpp:// these functions are for dumpAsText() only. No need to translate Layout- TNG-Output. cpp:Glib: :ustring Layout: :dumpAsText( ) const Layout- TNG.h: Glib::ustring dumpAsText() const; flowtext. cpp: //g_print( layout. dumpAsText( ).c_str( )); layout. dumpAsText( ).c_str( )); layout. dumpAsText( ).c_str( ));
---
D:\Dev\
src/libnrtype/
src/libnrtype/
src/libnrtype/
src/sp-
src/sp-text.cpp: //g_print(
src/sp-text.cpp: //g_print(
----
Unfortunately, uncommenting the calls from sp-text.cpp gives the following error message when compiling: :rebuildLayout( )': text.cpp: 521:17: error: format not a string literal and no format arguments [-Werror= format- security] text.cpp: 526:5: error: format not a string literal and no format arguments [-Werror= format- security]
----
compile src/sp-text.cpp
Make error line 304: problem compiling: src/sp-text.cpp: In member function 'void SPText:
src/sp-
src/sp-
cc1plus.exe: some warnings being treated as errors