summaryrefslogtreecommitdiff
path: root/app-text/unac/files/unac-1.8.0-debian-gcc-4.4-bug-556379.patch
blob: a006c4fbd787db6cce3df1ac8d53867e7395a21f (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556379

--- a/unac.c
+++ b/unac.c
@@ -13873,9 +13873,9 @@
     *out_lengthp = 0;
   } else {
     char* utf16 = 0;
-    int utf16_length = 0;
+    size_t utf16_length = 0;
     char* utf16_unaccented = 0;
-    int utf16_unaccented_length = 0;
+    size_t utf16_unaccented_length = 0;
   
     if(convert(charset, utf16be(), in, in_length, &utf16, &utf16_length) < 0) {
       return -1;
--- a/unaccent.c
+++ b/unaccent.c
@@ -90,7 +90,7 @@
     const char* charset = argv[optind++];
 
     char* unaccented = 0;
-    int unaccented_length = 0;
+    size_t unaccented_length = 0;
 
     if(optind >= argc) {
 #define BUFFER_SIZE 10240
@@ -101,7 +101,7 @@
 	  perror("");
 	  exit(1);
 	}
-	printf("%.*s", unaccented_length, unaccented);
+	printf("%.*s", (int)unaccented_length, unaccented);
       }
     } else {
       const char* string = argv[optind++];
@@ -114,7 +114,7 @@
 
       if(debug_level > UNAC_DEBUG_NONE)
 	fprintf(stderr, "unaccented version is ");
-      printf("%.*s\n", unaccented_length, unaccented);
+      printf("%.*s\n", (int)unaccented_length, unaccented);
 
       if(optind < argc) {
 	const char* expected = argv[optind++];