Re: Compiler warnings when compiling daemontools (like: warning: passing arg 2 of `getgroups' from incompatible pointer type)
Jeff King <[email protected]> Thu, 14 Jul 2005 10:56:34 -0400
| Newsgroups | gmane.comp.djb.package |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jul 14, 2005 at 02:17:52AM -0600, Charles Cazabon wrote:
> They're warnings, not errors. They do not affect the operation of the
> program(s), so the best idea is to pour yourself another cup and not worry
> about it.
That particular warning can often indicate a subtle bug:
$ cat >foo.c <<'EOF'
int zero(int *p, int n) { int i; for(i = 0; i < n; i++) p[i] = 0; }
int main() { short s[128]; zero(s, 128); return 0; }
EOF
$ gcc foo.c
foo.c: In function 'main':
foo.c:2: warning: passing argument 1 of 'zero' from incompatible pointer type
$ ./a.out
Segmentation fault
That being said, in this case it's probably not a problem, as the
chkshsgr program is only part of the build process, not the resulting
installed programs (or perhaps that is what you meant by "the
program(s)", but it was not clear to me).
-Peff