Warning fix for gcc 4.5 "operation may be undefined" warnings
authorMarc Dionne <marc.c.dionne@gmail.com>
Fri, 10 Sep 2010 01:02:05 +0000 (21:02 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 10 Sep 2010 22:20:05 +0000 (15:20 -0700)
commitd69914a5f0580f8048072d3b734558ea5b7b2df5
treea939a15387f774a3c6229c6c85b7182cbcc9cd3c
parent51806bd21af5bcc70c27cda5787ae853fa3f495e
Warning fix for gcc 4.5 "operation may be undefined" warnings

The inc_header_word and set_header_word macros make repeated use of their
argument, which triggers many (~30) warnings with gcc 4.5, like this one:

./ptutils.c:473:6: warning: operation on â€˜cheader.foreigncount’ may be undefined

Removing the cast to afs_int32 in the macros gets rid of the warning,
and should be safe since we're just getting a small positive integer value
- the offset of the member in the structure - and passing it to the
pr_Write function which expects an afs_int32.

Change-Id: Ie493520f874cddbb4b7f9f7ebe4b3922a848d0d0
Reviewed-on: http://gerrit.openafs.org/2729
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/ptserver/ptserver.h