Holger Hans Peter Freyther | b49f512 | 2011-11-11 21:36:15 +0800 | [diff] [blame] | 1 | diff -urNad libgsm-1.0.10~/src/debug.c libgsm-1.0.10/src/debug.c |
| 2 | --- libgsm-1.0.10~/src/debug.c 2007-11-01 15:37:52.000000000 +0100 |
| 3 | +++ libgsm-1.0.10/src/debug.c 2007-11-01 15:53:42.000000000 +0100 |
| 4 | @@ -49,7 +49,7 @@ |
| 5 | fprintf( stderr, "%s [%d .. %d]: ", name, from, to ); |
| 6 | while (from <= to) { |
| 7 | |
| 8 | - fprintf(stderr, "%d ", ptr[ from ] ); |
| 9 | + fprintf(stderr, "%ld ", ptr[ from ] ); |
| 10 | from++; |
| 11 | if (nprinted++ >= 7) { |
| 12 | nprinted = 0; |
| 13 | @@ -63,14 +63,14 @@ |
| 14 | char * name, |
| 15 | longword value ) |
| 16 | { |
| 17 | - fprintf(stderr, "%s: %d\n", name, (long)value ); |
| 18 | + fprintf(stderr, "%s: %ld\n", name, (long)value ); |
| 19 | } |
| 20 | |
| 21 | void gsm_debug_word P2( (name, value), |
| 22 | char * name, |
| 23 | word value ) |
| 24 | { |
| 25 | - fprintf(stderr, "%s: %d\n", name, (long)value); |
| 26 | + fprintf(stderr, "%s: %ld\n", name, (long)value); |
| 27 | } |
| 28 | |
| 29 | #endif |
| 30 | diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c |
| 31 | --- libgsm-1.0.10~/src/toast.c 2007-11-01 15:37:52.000000000 +0100 |
| 32 | +++ libgsm-1.0.10/src/toast.c 2007-11-01 15:53:42.000000000 +0100 |
| 33 | @@ -251,8 +251,8 @@ |
| 34 | { |
| 35 | char * s; |
| 36 | if (!(s = malloc(len))) { |
| 37 | - fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n", |
| 38 | - progname, len); |
| 39 | + fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n", |
| 40 | + progname, (long) len); |
| 41 | onintr(); |
| 42 | exit(1); |
| 43 | } |
| 44 | @@ -270,7 +270,7 @@ |
| 45 | maxlen = strlen(name) + 1 + strlen(want) + strlen(cut); |
| 46 | p = strcpy(emalloc(maxlen), name); |
| 47 | |
| 48 | - if (s = suffix(p, cut)) strcpy(s, want); |
| 49 | + if ((s = suffix(p, cut))) strcpy(s, want); |
| 50 | else if (*want && !suffix(p, want)) strcat(p, want); |
| 51 | |
| 52 | return p; |
| 53 | @@ -386,7 +386,7 @@ |
| 54 | ut[0] = instat.st_atime; |
| 55 | ut[1] = instat.st_mtime; |
| 56 | |
| 57 | - (void) utime(outname, ut); |
| 58 | + (void) utime(outname, (struct utimbuf *)ut); |
| 59 | |
| 60 | #endif /* UTIMBUF */ |
| 61 | } |
| 62 | @@ -416,7 +416,7 @@ |
| 63 | } |
| 64 | if (st->st_nlink > 1 && !f_cat && !f_precious) { |
| 65 | fprintf(stderr, |
| 66 | - "%s: \"%s\" has %s other link%s -- unchanged.\n", |
| 67 | + "%s: \"%s\" has %d other link%s -- unchanged.\n", |
| 68 | progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2)); |
| 69 | return 0; |
| 70 | } |
| 71 | @@ -585,8 +585,8 @@ |
| 72 | |
| 73 | if (cc != sizeof(s)) { |
| 74 | if (cc >= 0) fprintf(stderr, |
| 75 | - "%s: incomplete frame (%d byte%s missing) from %s\n", |
| 76 | - progname, sizeof(s) - cc, |
| 77 | + "%s: incomplete frame (%ld byte%s missing) from %s\n", |
| 78 | + progname, (long) sizeof(s) - cc, |
| 79 | "s" + (sizeof(s) - cc == 1), |
| 80 | inname ? inname : "stdin" ); |
| 81 | gsm_destroy(r); |
| 82 | @@ -624,8 +624,6 @@ |
| 83 | |
| 84 | static int process P1((name), char * name) |
| 85 | { |
| 86 | - int step = 0; |
| 87 | - |
| 88 | out = (FILE *)0; |
| 89 | in = (FILE *)0; |
| 90 | |
| 91 | @@ -779,7 +777,6 @@ |
| 92 | case 'h': help(); exit(0); |
| 93 | |
| 94 | default: |
| 95 | - usage: |
| 96 | fprintf(stderr, |
| 97 | "Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n", |
| 98 | progname); |