Fixed printf format errors.

This commit is contained in:
Bruce Evans 1998-06-30 20:14:13 +00:00
parent c15a5b80be
commit 2512f2fe3b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37313
10 changed files with 22 additions and 21 deletions

View File

@ -98,7 +98,7 @@ format_node_info (node)
}
len = pad_to (44, line_buffer);
sprintf (line_buffer + len, "%d", node->nodelen);
sprintf (line_buffer + len, "%ld", node->nodelen);
if (node->filename && *(node->filename))
{

View File

@ -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 ");

View File

@ -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 ");

View File

@ -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

View File

@ -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);

View File

@ -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"));
}
}

View File

@ -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;
}

View File

@ -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)

View File

@ -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)

View File

@ -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);