libftdi Archives

Subject: -Wstrict-prototypes flags ftdi.h

From: Arnim Läuger <arnim.laeuger@xxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 08 May 2009 20:34:49 +0200
Hi,

Recently switched on -Wstrict-prototypes with -Wall (and -Werror) and
was confronted with a warning for ftdi.h:

gcc -std=gnu99 -I/usr/local/stow/libftdi-0.16/include -g -Wall
-Wstrict-prototypes -c main.c  -fPIC -DPIC -o main.o
In file included from main.c:1:
/usr/local/stow/libftdi-0.16/include/ftdi.h:270: warning: function
declaration isn't a prototype

gcc --version
gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision
135036]


The warning goes away if I change this line to
struct ftdi_context *ftdi_new(void);

Interestingly, the warning is not thrown when the explicit include path
to ftdi.h isn't specified on the command line.

Best regards
Arnim

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread