File: xmlparser-ftbfs-fix.patch

package info (click to toggle)
ruby-xmlparser 0.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 960 kB
  • sloc: ruby: 9,322; ansic: 4,005; makefile: 5
file content (20 lines) | stat: -rw-r--r-- 693 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- ruby-xmlparser-0.7.2.orig/ext/xmlparser.c
+++ ruby-xmlparser-0.7.2/ext/xmlparser.c
@@ -1780,7 +1780,7 @@ XMLParser_parse(int argc, VALUE* argv, V
       if (!ret) {
 	int err = XML_GetErrorCode(parser->parser);
 	const char* errStr = XML_ErrorString(err);
-	rb_raise(eXMLParserError, (char*)errStr);
+	rb_raise(eXMLParserError, "%s", errStr);
       }
     } while (!NIL_P(buf));
     return Qnil;
@@ -1829,7 +1829,7 @@ XMLParser_parse(int argc, VALUE* argv, V
   if (!ret) {
     int err = XML_GetErrorCode(parser->parser);
     const char* errStr = XML_ErrorString(err);
-    rb_raise(eXMLParserError, (char*)errStr);
+    rb_raise(eXMLParserError, "%s", errStr);
   }
 
   return Qnil;