summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-06-30 20:14:13 +0000
committerbde <bde@FreeBSD.org>1998-06-30 20:14:13 +0000
commit53d1b984ceb16d702513f6990576840c1c5d7cd0 (patch)
treeb5c7f440a7281f57b78d5886eee331e48601753c /gnu
parent080e3ef296732cdd3339a502a9a7484cd8751f50 (diff)
downloadFreeBSD-src-53d1b984ceb16d702513f6990576840c1c5d7cd0.zip
FreeBSD-src-53d1b984ceb16d702513f6990576840c1c5d7cd0.tar.gz
Fixed printf format errors.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/as/config/tc-i386.c4
-rw-r--r--gnu/usr.bin/as/expr.c4
-rw-r--r--gnu/usr.bin/as/messages.c6
-rw-r--r--gnu/usr.bin/grep/grep.c2
-rw-r--r--gnu/usr.bin/gzip/trees.c4
-rw-r--r--gnu/usr.bin/tar/diffarch.c7
-rw-r--r--gnu/usr.bin/tar/gnu.c2
-rw-r--r--gnu/usr.bin/tar/list.c8
-rw-r--r--gnu/usr.bin/tar/port.c4
9 files changed, 21 insertions, 20 deletions
diff --git a/gnu/usr.bin/as/config/tc-i386.c b/gnu/usr.bin/as/config/tc-i386.c
index fba7800..c275d2f 100644
--- a/gnu/usr.bin/as/config/tc-i386.c
+++ b/gnu/usr.bin/as/config/tc-i386.c
@@ -25,7 +25,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: tc-i386.c,v 1.8 1997/02/22 15:44:23 peter Exp $";
#endif
#include "as.h"
@@ -443,7 +443,7 @@ static void pe (e)
expressionS *e;
{
fprintf (stdout, " segment %s\n", segment_name (e->X_seg));
- fprintf (stdout, " add_number %d (%x)\n",
+ fprintf (stdout, " add_number %ld (%lx)\n",
e->X_add_number, e->X_add_number);
if (e->X_add_symbol) {
fprintf (stdout, " add_symbol ");
diff --git a/gnu/usr.bin/as/expr.c b/gnu/usr.bin/as/expr.c
index 7c168ff..d073287 100644
--- a/gnu/usr.bin/as/expr.c
+++ b/gnu/usr.bin/as/expr.c
@@ -25,7 +25,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: expr.c,v 1.6 1997/02/22 15:43:31 peter Exp $";
#endif
#include <ctype.h>
@@ -636,7 +636,7 @@ void pe (e)
expressionS *e;
{
fprintf (stdout, " segment %s\n", segment_name (e->X_seg));
- fprintf (stdout, " add_number %d (%x)\n",
+ fprintf (stdout, " add_number %ld (%lx)\n",
e->X_add_number, e->X_add_number);
if (e->X_add_symbol) {
fprintf (stdout, " add_symbol ");
diff --git a/gnu/usr.bin/as/messages.c b/gnu/usr.bin/as/messages.c
index ed5c8af..6c173bc 100644
--- a/gnu/usr.bin/as/messages.c
+++ b/gnu/usr.bin/as/messages.c
@@ -18,7 +18,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: messages.c,v 1.6 1997/02/22 15:43:40 peter Exp $";
#endif
#include <stdio.h>
@@ -559,7 +559,7 @@ fprint_value (file, val)
{
if (sizeof (val) <= sizeof (long))
{
- fprintf (file, "%ld", val);
+ fprintf (file, "%ld", (long) val);
return;
}
#ifdef BFD_ASSEMBLER
@@ -579,7 +579,7 @@ sprint_value (buf, val)
{
if (sizeof (val) <= sizeof (long))
{
- sprintf (buf, "%ld", val);
+ sprintf (buf, "%ld", (long) val);
return;
}
#ifdef BFD_ASSEMBLER
diff --git a/gnu/usr.bin/grep/grep.c b/gnu/usr.bin/grep/grep.c
index 9a0fe05..7234986 100644
--- a/gnu/usr.bin/grep/grep.c
+++ b/gnu/usr.bin/grep/grep.c
@@ -411,7 +411,7 @@ prline(beg, lim, sep)
lastnl = lim;
}
if (out_byte)
- printf("%lu%c", totalcc + (beg - bufbeg), sep);
+ printf("%lu%c", (unsigned long)(totalcc + (beg - bufbeg)), sep);
fwrite(beg, 1, lim - beg, stdout);
if (ferror(stdout))
error("writing output", errno);
diff --git a/gnu/usr.bin/gzip/trees.c b/gnu/usr.bin/gzip/trees.c
index a9b35be..1bad589 100644
--- a/gnu/usr.bin/gzip/trees.c
+++ b/gnu/usr.bin/gzip/trees.c
@@ -59,7 +59,7 @@
#include "gzip.h"
#ifdef RCSID
-static char rcsid[] = "$Id: trees.c,v 1.6 1997/02/22 15:46:01 peter Exp $";
+static char rcsid[] = "$Id: trees.c,v 1.7 1997/08/29 16:14:19 sos Exp $";
#endif
/* ===========================================================================
@@ -1070,6 +1070,6 @@ local void set_file_type()
while (n < LITERALS) bin_freq += dyn_ltree[n++].Freq;
*file_type = bin_freq > (ascii_freq >> 2) ? BINARY : ASCII;
if (*file_type == BINARY && translate_eol) {
- WARN((stderr, "-l used on binary file", ""));
+ WARN((stderr, "-l used on binary file"));
}
}
diff --git a/gnu/usr.bin/tar/diffarch.c b/gnu/usr.bin/tar/diffarch.c
index ce47d9d..80e48bc 100644
--- a/gnu/usr.bin/tar/diffarch.c
+++ b/gnu/usr.bin/tar/diffarch.c
@@ -442,7 +442,8 @@ compare_chunk (bytes, buffer)
}
else
{
- fprintf (msg_file, "%s: could only read %d of %d bytes\n", current_file_name, err, bytes);
+ fprintf (msg_file, "%s: could only read %d of %ld bytes\n",
+ current_file_name, err, bytes);
}
different++;
return -1;
@@ -619,7 +620,7 @@ diff_sparse_files (filesize)
if (err < 0)
msg_perror ("can't read %s", current_file_name);
else
- fprintf (msg_file, "%s: could only read %d of %d bytes\n",
+ fprintf (msg_file, "%s: could only read %d of %ld bytes\n",
current_file_name, err, numbytes);
break;
}
@@ -638,7 +639,7 @@ diff_sparse_files (filesize)
if (err < 0)
msg_perror ("can't read %s", current_file_name);
else
- fprintf (msg_file, "%s: could only read %d of %d bytes\n",
+ fprintf (msg_file, "%s: could only read %d of %ld bytes\n",
current_file_name, err, numbytes);
break;
}
diff --git a/gnu/usr.bin/tar/gnu.c b/gnu/usr.bin/tar/gnu.c
index d3a0446..b51618e 100644
--- a/gnu/usr.bin/tar/gnu.c
+++ b/gnu/usr.bin/tar/gnu.c
@@ -173,7 +173,7 @@ write_dir_file ()
msg_perror ("Can't write to %s", gnu_dumpfile);
return;
}
- fprintf (fp, "%lu\n", this_time);
+ fprintf (fp, "%lu\n", (unsigned long) this_time);
for (dp = dir_list; dp; dp = dp->next)
{
if (!dp->dir_text)
diff --git a/gnu/usr.bin/tar/list.c b/gnu/usr.bin/tar/list.c
index 79d2654..a3329c9 100644
--- a/gnu/usr.bin/tar/list.c
+++ b/gnu/usr.bin/tar/list.c
@@ -568,7 +568,7 @@ print_header ()
extern long baserec;
if (f_sayblock)
- fprintf (msg_file, "rec %10d: ", baserec + (ar_record - ar_block));
+ fprintf (msg_file, "rec %10ld: ", baserec + (ar_record - ar_block));
/* annofile(msg_file, (char *)NULL); */
if (f_verbose <= 1)
@@ -653,7 +653,7 @@ print_header ()
else
{
user = uform;
- (void) sprintf (uform, "%d",
+ (void) sprintf (uform, "%ld",
from_oct (8, head->header.uid));
}
if (*head->header.gname && head_standard)
@@ -663,7 +663,7 @@ print_header ()
else
{
group = gform;
- (void) sprintf (gform, "%d",
+ (void) sprintf (gform, "%ld",
from_oct (8, head->header.gid));
}
@@ -779,7 +779,7 @@ pr_mkdir (pathname, length, mode)
demode ((unsigned) mode, modes + 1);
if (f_sayblock)
- fprintf (msg_file, "rec %10d: ", baserec + (ar_record - ar_block));
+ fprintf (msg_file, "rec %10ld: ", baserec + (ar_record - ar_block));
/* annofile(msg_file, (char *)NULL); */
name = quote_copy_string (pathname);
if (!name)
diff --git a/gnu/usr.bin/tar/port.c b/gnu/usr.bin/tar/port.c
index c163245..60b0f0f 100644
--- a/gnu/usr.bin/tar/port.c
+++ b/gnu/usr.bin/tar/port.c
@@ -1116,7 +1116,7 @@ msg (char *str,...)
fflush (msg_file);
fprintf (stderr, "%s: ", tar);
if (f_sayblock)
- fprintf (stderr, "rec %d: ", baserec + (ar_record - ar_block));
+ fprintf (stderr, "rec %ld: ", baserec + (ar_record - ar_block));
vfprintf (stderr, str, args);
va_end (args);
putc ('\n', stderr);
@@ -1133,7 +1133,7 @@ msg_perror (char *str,...)
fflush (msg_file);
fprintf (stderr, "%s: ", tar);
if (f_sayblock)
- fprintf (stderr, "rec %d: ", baserec + (ar_record - ar_block));
+ fprintf (stderr, "rec %ld: ", baserec + (ar_record - ar_block));
va_start (args, str);
vfprintf (stderr, str, args);
va_end (args);
OpenPOWER on IntegriCloud