* [PATCH] fix warnings in scripts/binoffset.c
@ 2004-08-17 3:28 Randy.Dunlap
2004-08-17 22:13 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2004-08-17 3:28 UTC (permalink / raw)
To: lkml; +Cc: akpm
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>
diffstat:
scripts/binoffset.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
--- ./scripts/binoffsetlk.c 2004-06-15 22:19:36.000000000 -0700
+++ ./scripts/binoffset.c 2004-08-09 20:28:01.000000000 -0700
@@ -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 @@ void usage (void)
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 @@ int get_pattern (int pat_count, char *pa
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 @@ size_t get_filesize (int fd)
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 @@ int main (int argc, char *argv [])
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);
}
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix warnings in scripts/binoffset.c
2004-08-17 22:13 ` Sam Ravnborg
@ 2004-08-17 20:21 ` Randy.Dunlap
2004-08-17 22:50 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2004-08-17 20:21 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kernel, akpm
On Wed, 18 Aug 2004 00:13:32 +0200 Sam Ravnborg wrote:
| On Mon, Aug 16, 2004 at 08:28:05PM -0700, Randy.Dunlap wrote:
| >
| > 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>
|
| Added to my tree - but..
| How am I supposed to build binoffset when I decide
| to use extract-config?
Good question. I'm (slowly) working on that. I also have
some contributed patches that address that... patience.
I was thinking about 'make getconfig', but that would be only
one way to use it. It would still need an external/out-of-tree
solution also. ('make getconfig' would build binoffset and run
the extract-ikconfig script.)
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix warnings in scripts/binoffset.c
2004-08-17 3:28 [PATCH] fix warnings in scripts/binoffset.c Randy.Dunlap
@ 2004-08-17 22:13 ` Sam Ravnborg
2004-08-17 20:21 ` Randy.Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2004-08-17 22:13 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: lkml, akpm
On Mon, Aug 16, 2004 at 08:28:05PM -0700, Randy.Dunlap wrote:
>
> 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>
Added to my tree - but..
How am I supposed to build binoffset when I decide
to use extract-config?
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix warnings in scripts/binoffset.c
2004-08-17 20:21 ` Randy.Dunlap
@ 2004-08-17 22:50 ` Sam Ravnborg
0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2004-08-17 22:50 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: Sam Ravnborg, linux-kernel, akpm
On Tue, Aug 17, 2004 at 01:21:04PM -0700, Randy.Dunlap wrote:
> |
> | Added to my tree - but..
> | How am I supposed to build binoffset when I decide
> | to use extract-config?
>
> Good question. I'm (slowly) working on that. I also have
> some contributed patches that address that... patience.
>
> I was thinking about 'make getconfig', but that would be only
> one way to use it. It would still need an external/out-of-tree
> solution also. ('make getconfig' would build binoffset and run
> the extract-ikconfig script.)
If you want to do that you need to move binoffset to scripts/kconfig/
All *config target are handled by the Makefile there.
And if you want to compile a hostprogram only on demand it needs to
be in the same dir as the Makefile. It can be worked around, but
moving the file is the better solution.
One other way would be to build binoffset when CONFIG_IKCONFIG is set.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-17 20:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-17 3:28 [PATCH] fix warnings in scripts/binoffset.c Randy.Dunlap
2004-08-17 22:13 ` Sam Ravnborg
2004-08-17 20:21 ` Randy.Dunlap
2004-08-17 22:50 ` Sam Ravnborg
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®