Re: gcc3 and compiler warnings

2002-04-07 Thread Neal H Walfield
> Ok, so the parentheses only tell the compiler to increment the pointer and not > the value that the pointer is pointing to. That is what was always happening. I think that you do not understand what a postincrement does: void* post_pointer_inc (void **p) { void *r =

Re: gcc3 and compiler warnings

2002-04-07 Thread James Morrison
--- Neal H Walfield <[EMAIL PROTECTED]> wrote: > > Would this not change semantics of the line by moving the pointer p before > > dereferencing it? > > No, it is a post-increment. > Ok, so the parentheses only tell the compiler to increment the pointer and not the value that the pointer is

Re: gcc3 and compiler warnings

2002-04-07 Thread Neal H Walfield
> Would this not change semantics of the line by moving the pointer p before > dereferencing it? No, it is a post-increment. ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd

Re: gcc3 and compiler warnings

2002-04-07 Thread James Morrison
--- Marcus Brinkmann <[EMAIL PROTECTED]> wrote: > On Sat, Apr 06, 2002 at 02:34:08PM -0800, James Morrison wrote: > > Hi, > > > > gcc3 produces warnings for code that looks like: > > major = ntohl (*p++); > > where p is a pointer. There is a lot of code that looks like this in > > hu

Re: gcc3 and compiler warnings

2002-04-07 Thread Marcus Brinkmann
On Sat, Apr 06, 2002 at 02:34:08PM -0800, James Morrison wrote: > Hi, > > gcc3 produces warnings for code that looks like: > major = ntohl (*p++); > where p is a pointer. There is a lot of code that looks like this in > hurd/nfs. > would the fix look like: > major = ntohl (*p);