summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorAndrew O. Shadoura <bugzilla@tut.by>2011-03-19 20:47:39 +0200
committerAndrew O. Shadoura <bugzilla@tut.by>2011-03-19 20:47:39 +0200
commite5ffc393b29a49d9d7e3ebd4e564d3663d83b948 (patch)
treed11c52bee092d5450b5f9d072fafebdec266e72c /debian
parentc9f72f3f468584436a08f6239769a12701c7c7ba (diff)
harness.c: Format '%ld' expects type 'long int', but argument 2 has type 'size_t', so use '%lz'
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/use-proper-format-string.diff16
2 files changed, 17 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series
index 341f07c..3cb8db3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
fix-typo-on-mowgli-url.hg219e1937b9f5.diff
+use-proper-format-string.diff
diff --git a/debian/patches/use-proper-format-string.diff b/debian/patches/use-proper-format-string.diff
new file mode 100644
index 0000000..7c9f81c
--- /dev/null
+++ b/debian/patches/use-proper-format-string.diff
@@ -0,0 +1,16 @@
+Description: Use the proper format string
+ Format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘size_t’,
+ so use ‘%lz’.
+Author: Andrew O. Shadoura <bugzilla@tut.by>
+
+--- libguess-1.0.orig/src/tests/harness.c
++++ libguess-1.0/src/tests/harness.c
+@@ -20,7 +20,7 @@ int main(int argc, char **argv)
+
+ while (fgets(buf, 1024 * 1024 - 1, fp))
+ {
+- printf("length = %ld\n", strlen(buf));
++ printf("length = %z\n", strlen(buf));
+ printf("jp = %s\n", libguess_determine_encoding(buf, strlen(buf), GUESS_REGION_JP));
+ printf("tw = %s\n", libguess_determine_encoding(buf, strlen(buf), GUESS_REGION_TW));
+ printf("cn = %s\n", libguess_determine_encoding(buf, strlen(buf), GUESS_REGION_CN));