File: xmlparser-ftbfs-fix.patch

package info (click to toggle)
ruby-xmlparser 0.7.3-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 980 kB
  • sloc: ruby: 9,342; ansic: 2,017; makefile: 11
file content (30 lines) | stat: -rw-r--r-- 914 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
21
22
23
24
25
26
27
28
29
30
From: Gregor Herrman <gregoa@debian.org>
Date: Fri, 22 Jun 2012 18:24:07 +0200
Subject: xmlparser ftbfs fix

---
 xmlparser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xmlparser.c b/xmlparser.c
index faa82ac..ce7df91 100644
--- a/xmlparser.c
+++ b/xmlparser.c
@@ -1780,7 +1780,7 @@ XMLParser_parse(int argc, VALUE* argv, VALUE obj)
       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, VALUE obj)
   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;