GCC ignores mismatched prototypes involving integers
>Submitter-Id: net
>Originator: Justin Pryzby
>Organization:
>Confidential: no
>Synopsis: GCC ignores mismatched prototypes involving integers
>Severity: non-critical
>Priority: medium
>Category: c
>Class: accepts-illegal
>Release: 3.3.4 (Debian 1:3.3.4-2) (Debian testing/unstable)
>Environment:
System: Linux andromeda 2.6.7 #20 Wed Jul 7 15:31:10 EDT 2004 i686 GNU/Linux
Architecture: i686
host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
>Description:
Any number of integers in a function are allowed, even if the
prototype declares no integers.
>How-To-Repeat:
pryzbyj@andromeda:~/remote_save/cane_st7ctl_2004_07_11$ grep '^void drift' *.{c,h}; echo; touch *.{c,h}; make
st7ctl.c:void drift(int exptime, int a, int b, int c)
st7ctl.h:void drift();
cc -Wall -W -c -o st7ctl.o st7ctl.c
st7ctl.c: In function `drift':
st7ctl.c:463: warning: unused parameter `a'
st7ctl.c:463: warning: unused parameter `b'
st7ctl.c:463: warning: unused parameter `c'
st7ctl.c: In function `calibrate':
st7ctl.c:689: warning: unused variable `pixpersecx'
st7ctl.c:689: warning: unused variable `pixpersecy'
st7ctl.c:690: warning: unused variable `bltx'
st7ctl.c:690: warning: unused variable `blty'
cc st7ctl.o -lm -lsbigudrv -o st7ctl
>Fix:
None known.
Reply to: