cmocka: use %p to printf a pointer
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 19 Jul 2014 17:51:19 +0000 (18:51 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 23 Jul 2014 05:38:42 +0000 (07:38 +0200)
commit61b2b557951a88441a88e37bb0014e158cc8a14d
tree4747e70b63f5913cf8e86832473a398581e977e1
parent606ba3cb75e0ffccf609003c7c45eb3479231396
cmocka: use %p to printf a pointer

Allegedly some versions of MSVC do not prefix the address with 0x
whenever %p is used, while gcc (mingw-w64) always do. There is no
clear way around this without providing a custom define, which
currently is an overkill imho, as there is only one use-case.

Silences the following warning when building with mingw-w64

cmocka/src/cmocka.c:1636:25: warning: format ‘%x’ expects argument of
type ‘unsigned int’, but argument 3 has type ‘PVOID’ [-Wformat=]

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
src/cmocka.c