bug-hurd
[Top][All Lists]
Advanced

[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)

 Hi,

  As I had previously mentioned gcc3 warns that,
      attrs_exist = ntohl (*p++); 
and
      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
  p++;
  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
http://hurd.dyndns.org

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

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/



reply via email to

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