From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kernel@vger.kernel.org
Subject: kbuild: Fix warnings in binoffset.c
Date: Thu, 19 Aug 2004 01:06:23 +0200 [thread overview]
Message-ID: <20040818230623.GD23495@mars.ravnborg.org> (raw)
In-Reply-To: <20040818230252.GA23495@mars.ravnborg.org>
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/18 00:02:40+02:00 rddunlap@osdl.org
# fix warnings in scripts/binoffset.c
#
# Correct gcc warnings for function return type, printf argument
# types, and signed/unsigned compare.
#
# Cross-compiled with no warnings/errors for alpha, ia64,
# ppc32, ppc64, sparc32, sparc64, x86_64, and native on i386.
# (-W -Wall)
#
# [pre-built tool chains are available from:
# http://developer.osdl.org/dev/plm/cross_compile/ ]
#
# Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
# Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
#
# scripts/binoffset.c
# 2004/08/10 05:28:01+02:00 rddunlap@osdl.org +6 -6
# fix warnings in scripts/binoffset.c
#
diff -Nru a/scripts/binoffset.c b/scripts/binoffset.c
--- a/scripts/binoffset.c 2004-08-19 01:06:15 +02:00
+++ b/scripts/binoffset.c 2004-08-19 01:06:15 +02:00
@@ -41,7 +41,7 @@
char *progname;
char *inputname;
int inputfd;
-int bix; /* buf index */
+unsigned int bix; /* buf index */
unsigned char patterns [PAT_SIZE] = {0}; /* byte-sized pattern array */
int pat_len; /* actual number of pattern bytes */
unsigned char *madr; /* mmap address */
@@ -58,7 +58,7 @@
exit (1);
}
-int get_pattern (int pat_count, char *pats [])
+void get_pattern (int pat_count, char *pats [])
{
int ix, err, tmp;
@@ -81,7 +81,7 @@
pat_len = pat_count;
}
-int search_pattern (void)
+void search_pattern (void)
{
for (bix = 0; bix < filesize; bix++) {
if (madr[bix] == patterns[0]) {
@@ -109,7 +109,7 @@
struct stat stat;
err = fstat (fd, &stat);
- fprintf (stderr, "filesize: %d\n", err < 0 ? err : stat.st_size);
+ fprintf (stderr, "filesize: %ld\n", err < 0 ? (long)err : stat.st_size);
if (err < 0)
return err;
return (size_t) stat.st_size;
@@ -154,8 +154,8 @@
fprintf (stderr, "number of pattern matches = %d\n", num_matches);
if (num_matches == 0)
firstloc = ~0;
- printf ("%d\n", firstloc);
- fprintf (stderr, "%d\n", firstloc);
+ printf ("%ld\n", firstloc);
+ fprintf (stderr, "%ld\n", firstloc);
exit (num_matches ? 0 : 2);
}
next prev parent reply other threads:[~2004-08-18 21:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-18 23:02 Kbuild updates Sam Ravnborg
2004-08-18 23:04 ` kbuild: Fix parallel build Sam Ravnborg
2004-08-18 23:05 ` kbuild: make C=2 forces sparse run Sam Ravnborg
2004-08-18 23:06 ` Sam Ravnborg [this message]
2004-08-18 23:07 ` kbuild: Remove last occurrence of HEAD Sam Ravnborg
2004-08-18 23:08 ` kbuild: Add comments to Makefile.clean Sam Ravnborg
2004-08-18 23:09 ` kbuild: Added CHECKFLAGS to enable 'make CHECK=mysparse' Sam Ravnborg
2004-08-18 23:13 ` Kbuild updates Sam Ravnborg
2004-08-18 21:34 ` kernel 2.6 and networking enhancements Imran Badr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040818230623.GD23495@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®