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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
$Id$
--- gsm-1.0-pl10.orig/src/toast.c Tue Jul 2 16:32:55 1996
+++ gsm-1.0-pl10/src/toast.c Sat Jan 20 13:06:50 2007
@@ -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, len);
+ fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n",
+ progname, (long) len);
onintr();
exit(1);
}
@@ -270,7 +270,7 @@ static char* normalname P3((name, want,
maxlen = strlen(name) + 1 + strlen(want) + strlen(cut);
p = strcpy(emalloc(maxlen), name);
- if (s = suffix(p, cut)) strcpy(s, want);
+ if ((s = suffix(p, cut))) strcpy(s, want);
else if (*want && !suffix(p, want)) strcat(p, want);
return p;
@@ -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 */
}
@@ -416,7 +416,7 @@ static int okay_as_input P3((name,f,st),
}
if (st->st_nlink > 1 && !f_cat && !f_precious) {
fprintf(stderr,
- "%s: \"%s\" has %s other link%s -- unchanged.\n",
+ "%s: \"%s\" has %d other link%s -- unchanged.\n",
progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2));
return 0;
}
@@ -585,8 +585,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, 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);
@@ -624,8 +624,6 @@ static int process_decode P0()
static int process P1((name), char * name)
{
- int step = 0;
-
out = (FILE *)0;
in = (FILE *)0;
@@ -779,7 +777,6 @@ int main P2((ac, av), int ac, char **av)
case 'h': help(); exit(0);
default:
- usage:
fprintf(stderr,
"Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n",
progname);
|