diff options
author | deva <deva> | 2009-12-18 08:45:12 +0000 |
---|---|---|
committer | deva <deva> | 2009-12-18 08:45:12 +0000 |
commit | 2f0bf2d0af5b9b749e6e195829fb7093fc8ab930 (patch) | |
tree | 37374c59ad77b30477929bf89689ac3c1645f792 /server/src/saxparser.cc | |
parent | 817072bf0ae27484394a77a016cfe07b35885b8a (diff) |
Fix compiler warnings "format not a string literal and no format arguments". Actually exposed a bug in luaresume.cc
Diffstat (limited to 'server/src/saxparser.cc')
-rw-r--r-- | server/src/saxparser.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/src/saxparser.cc b/server/src/saxparser.cc index 2018645..b5fb812 100644 --- a/server/src/saxparser.cc +++ b/server/src/saxparser.cc @@ -262,7 +262,7 @@ TEST_BEGIN; FILE *fp = fopen(XMLFILE, "w"); TEST_NOTEQUAL(fp, NULL, "Test if file \""XMLFILE"\" could be written."); if(!fp) TEST_FATAL("Could not write "XMLFILE); -fprintf(fp, xml); +fprintf(fp, "%s", xml); fclose(fp); TEST_MSG("Test callback parser."); @@ -295,8 +295,8 @@ for(size_t sz = 1; sz < 1000; sz++) { fp = fopen(XMLFILE, "w"); TEST_NOTEQUAL(fp, NULL, "Test if file \""XMLFILE"\" could be written."); if(!fp) TEST_FATAL("Could not write "XMLFILE); -fprintf(fp, xml_notrailingwhitespace); -fprintf(fp, xml_notrailingwhitespace); +fprintf(fp, "%s", xml_notrailingwhitespace); +fprintf(fp, "%s", xml_notrailingwhitespace); fclose(fp); TEST_MSG("Test buffer parser with multiple documents in the same buffer."); @@ -341,7 +341,7 @@ TEST_MSG("Test buffer parser with multiple documents in the same buffer."); fp = fopen(XMLFILE, "w"); TEST_NOTEQUAL(fp, NULL, "Test if file \""XMLFILE"\" could be written."); if(!fp) TEST_FATAL("Could not write "XMLFILE); -fprintf(fp, xml_fail); +fprintf(fp, "%s", xml_fail); fclose(fp); TEST_MSG("Test failure"); @@ -359,7 +359,7 @@ goon: fp = fopen(XMLFILE, "w"); TEST_NOTEQUAL(fp, NULL, "Test if file \""XMLFILE"\" could be written."); if(!fp) TEST_FATAL("Could not write "XMLFILE); -fprintf(fp, xml_fail2); +fprintf(fp, "%s", xml_fail2); fclose(fp); // Test failure |