File: 05_compiler_warnings.patch

package info (click to toggle)
libgsm 1.0.18-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster
  • size: 632 kB
  • sloc: ansic: 6,246; makefile: 315
file content (36 lines) | stat: -rw-r--r-- 1,054 bytes parent folder | download
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
From: Jochen Friedrich <jochen@scram.de>
Subject: Clean up comiler warnings (Closes: #226561)

--- a/src/toast.c
+++ b/src/toast.c
@@ -251,8 +251,8 @@ static char * emalloc P1((len), size_t l
 {
 	char * s;
 	if (!(s = malloc(len))) {
-		fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n",
-			progname, (int)len);
+		fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n",
+			progname, (long)len);
 		onintr();
 		exit(1);
 	}
@@ -386,7 +386,7 @@ static void update_times P0()
 		ut[0] = instat.st_atime;
 		ut[1] = instat.st_mtime;
 
-		(void) utime(outname, ut);
+		(void) utime(outname, (struct utimbuf *)ut);
 
 #endif	/* UTIMBUF */
 	}
@@ -586,8 +586,8 @@ static int process_decode P0()
 
 		if (cc != sizeof(s)) {
 			if (cc >= 0) fprintf(stderr,
-			"%s: incomplete frame (%d byte%s missing) from %s\n",
-					progname, (int)(sizeof(s) - cc),
+			"%s: incomplete frame (%ld byte%s missing) from %s\n",
+					progname, (long)(sizeof(s) - cc),
 					"s" + (sizeof(s) - cc == 1),
 					inname ? inname : "stdin" );
 			gsm_destroy(r);