This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/132] New: sscanf.c possible bug
- From: "fabio_sassi at libero dot it" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 25 Apr 2004 20:02:07 -0000
- Subject: [Bug libc/132] New: sscanf.c possible bug
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
>Synopsis:
possible bug in sscanf.c
>Severity:
normal
>Priority:
medium
>Category:
libc
>Class:
doc-bug
>Release:
libc-2.3.2
>Environment:
Host type: i686-pc-linux-gnu
System: Linux levahiatan 2.4.22-openmosix-2 #4 Thu Feb 5 18:31:39 CET 2004 i686
unknown
Architecture: i686
Addons: linuxthreads
Build CFLAGS: -g -O2
Build CC: gcc
Compiler version: 3.3.2
Kernel headers: 2.4.22-openmosix-2
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
>Description:
Error during compilation:
sscanf.c:31: warning: conflicting types for built-in function `sscanf'
sscanf.c: In function `sscanf':
sscanf.c:37: error: `va_start' used in function with fixed args
../stdio-common/_itoa.h: At top level:
../stdio-common/_itoa.h:40: warning: inlining failed in call to `_itoa_word'
../stdio-common/_itoa.h:76: warning: called from here
make[2]: *** [/other/lib/glibcOBJ/stdio-common/sscanf.o] Error 1
make[1]: *** [stdio-common/subdir_lib] Error 2
make: *** [all] Error 2
>How-To-Repeat:
I follow the normal installation procedure:
mkdir glibOBJ
cd glibOBJ
../glib-2.3.2/configure --enable-add-ons
make
>Fix:
I modify the file sscanf.c
(I hope that my modify don't damage something)
Original:
int
sscanf (s, format)
const char *s;
const char *format;
{
va_list arg;
int done;
va_start (arg, format);
done = __vsscanf (s, format, arg);
va_end (arg);
return done;
}
libc_hidden_def (sscanf)
Modified (add ",..." in function argument):
int
sscanf (const char *s, const char *format, ...)
{
va_list arg;
int done;
va_start (arg, format);
done = __vsscanf (s, format, arg);
va_end (arg);
return done;
}
libc_hidden_def (sscanf)
--
Summary: sscanf.c possible bug
Product: glibc
Version: 2.3.2
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: fabio_sassi at libero dot it
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=132
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.