Fix ntohl() related warnings about printf formatting
commitc2849fc4b1a4618f2d81ef2597d7e40d7b2e048c
authorSteffen Prohaska <prohaska@zib.de>
Sat, 17 Nov 2007 18:16:53 +0000 (17 19:16 +0100)
committerSteffen Prohaska <prohaska@zib.de>
Wed, 21 Nov 2007 06:58:10 +0000 (21 07:58 +0100)
tree3a575bb52222bba5e2692c070af84d13cce7fd72
parent5a09d6a3ac8f4fa39e059ad61ece1aabd5a861e1
Fix ntohl() related warnings about printf formatting

On Windows, ntohl() returns unsinged long.  On Unix it returns
uint32_t.  This makes choosing a suitable printf format string
hard.

This commit introduces a mingw specific helper function
git_ntohl() that casts to unsigned int before returning.  This
makes gcc's printf format check happy.  It should be safe because
we expect ntohl to use 32-bit numbers.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
git-compat-util.h