Date: Mon, 26 Jan 1998 02:33:15 -0500 From: Brian Reichert <reichert@numachi.com> To: freebsd-questions@FreeBSD.ORG Subject: gcc -Wall wierdness? Message-ID: <19980126023315.47723@numachi.com>
next in thread | raw e-mail | index | archive | help
Howdy- I'm running 2.2.2-R, with gcc 2.7.2.1, and am getting a weird symptom: With this simple program: --------------------------------- #include <stdio.h> #include <string.h> void main () { printf("read failed: %s\n", strerror[0]); } --------------------------------- gcc -Wall yields, upon compiling: foo.c: In function `main': foo.c:6: warning: char format, different type arg (arg 2) So, what gives? strerror(3) says to pull in <string.h>, which seems to prototype it as char *. Is this a GNU bad, or has FreeBSD done something clever, or (horrors) am I missing the point entirely? -- Brian Reichert reichert@numachi.com 37 Crystal Ave. #303 Derry NH 03038-1713 USA Intel architecture: the left-hand path
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980126023315.47723>