]> git.michaelhowe.org Git - packages/o/openafs.git/commit
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>
Mon, 27 Sep 2010 15:25:53 +0000 (08:25 -0700)
commitfb5c2b4c1f05743f392890b6b2b90fe94e8df599
tree83289291d94a9451b237327c5bfe38e94fccd170
parenta16b1119b870a8f7e968ea1ae71ee950e2adbf78
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>
(cherry picked from commit d69914a5f0580f8048072d3b734558ea5b7b2df5)
Reviewed-on: http://gerrit.openafs.org/2789
Tested-by: Derrick Brashear <shadow@dementia.org>
src/ptserver/ptserver.h