* [PATCH 2/2] Fix signed char problem in scripts/kconfig
@ 2005-06-22 9:03 Pierre Ossman
2005-06-22 14:44 ` Roman Zippel
0 siblings, 1 reply; 2+ messages in thread
From: Pierre Ossman @ 2005-06-22 9:03 UTC (permalink / raw)
To: Roman Zippel, kbuild-devel, LKML
[-- Attachment #1: Type: text/plain, Size: 587 bytes --]
The signed characters in scripts are causing warnings with GCC 4 on
systems with proper string functions (with char*, not signed char* as
parameters). Some could be kept signed but most had to be reverted to
normal chars.
Detailed changelog:
mconf.c:
- buf/bufptr was used in vsprintf() so it couldn't be signed.
confdata.c:
- conf_expand_value() used strchr() and strncat() forcing
"normal" strings.
conf.c:
- line was used with several string functions so it couldn't be
signed.
- strip() uses strlen() so same thing there.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
[-- Attachment #2: signed-char-kconfig.patch --]
[-- Type: text/x-patch, Size: 1723 bytes --]
Index: linux-wbsd/scripts/kconfig/mconf.c
===================================================================
--- linux-wbsd/scripts/kconfig/mconf.c (revision 153)
+++ linux-wbsd/scripts/kconfig/mconf.c (working copy)
@@ -254,8 +254,8 @@
" USB$ => find all CONFIG_ symbols ending with USB\n"
"\n");
-static signed char buf[4096], *bufptr = buf;
-static signed char input_buf[4096];
+static char buf[4096], *bufptr = buf;
+static char input_buf[4096];
static char filename[PATH_MAX+1] = ".config";
static char *args[1024], **argptr = args;
static int indent;
Index: linux-wbsd/scripts/kconfig/confdata.c
===================================================================
--- linux-wbsd/scripts/kconfig/confdata.c (revision 153)
+++ linux-wbsd/scripts/kconfig/confdata.c (working copy)
@@ -27,10 +27,10 @@
NULL,
};
-static char *conf_expand_value(const signed char *in)
+static char *conf_expand_value(const char *in)
{
struct symbol *sym;
- const signed char *src;
+ const char *src;
static char res_value[SYMBOL_MAXLENGTH];
char *dst, name[SYMBOL_MAXLENGTH];
Index: linux-wbsd/scripts/kconfig/conf.c
===================================================================
--- linux-wbsd/scripts/kconfig/conf.c (revision 153)
+++ linux-wbsd/scripts/kconfig/conf.c (working copy)
@@ -31,14 +31,14 @@
static int indent = 1;
static int valid_stdin = 1;
static int conf_cnt;
-static signed char line[128];
+static char line[128];
static struct menu *rootEntry;
static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
-static void strip(signed char *str)
+static void strip(char *str)
{
- signed char *p = str;
+ char *p = str;
int l;
while ((isspace(*p)))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] Fix signed char problem in scripts/kconfig
2005-06-22 9:03 [PATCH 2/2] Fix signed char problem in scripts/kconfig Pierre Ossman
@ 2005-06-22 14:44 ` Roman Zippel
0 siblings, 0 replies; 2+ messages in thread
From: Roman Zippel @ 2005-06-22 14:44 UTC (permalink / raw)
To: Pierre Ossman; +Cc: kbuild-devel, LKML
Hi,
On Wed, 22 Jun 2005, Pierre Ossman wrote:
> The signed characters in scripts are causing warnings with GCC 4 on
> systems with proper string functions (with char*, not signed char* as
> parameters). Some could be kept signed but most had to be reverted to
> normal chars.
>
> Detailed changelog:
>
> mconf.c:
> - buf/bufptr was used in vsprintf() so it couldn't be signed.
> confdata.c:
> - conf_expand_value() used strchr() and strncat() forcing
> "normal" strings.
> conf.c:
> - line was used with several string functions so it couldn't be
> signed.
> - strip() uses strlen() so same thing there.
>
> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Acked-by: Roman Zippel <zippel@linux-m68k.org>
Looks good, thanks.
bye, Roman
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-22 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-22 9:03 [PATCH 2/2] Fix signed char problem in scripts/kconfig Pierre Ossman
2005-06-22 14:44 ` Roman Zippel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox