[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More gcc3 compiler warnings

From: James Morrison
Subject: More gcc3 compiler warnings
Date: Mon, 8 Apr 2002 07:12:32 -0700 (PDT)


  As I had previously mentioned gcc3 warns that,
      attrs_exist = ntohl (*p++); 
      attrs_exist = ntohl (*(p++));
' operation on `p' may be undefined'.

 However, in nfs/rpc.c we have:
  switch (ntohl (*p++))
 The only way I have though of fixing this so far is with
  switch (ntohl (p[-1]))
 In rpc.c p is used in some cases of the switch statment, so p needs to be 
incremented before those cases use p.

 Are there any better ways to fix this than to use p[-1]?

James Morrison
   University of Waterloo
   Computer Science - Digital Hardware
   2A co-op

Anyone refering this as 'Open Source' shall be eaten by a GNU

Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax

reply via email to

[Prev in Thread] Current Thread [Next in Thread]