From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH 2/3] app/test: Fix size_t printf formart issue Date: Thu, 5 Mar 2015 13:22:33 +0000 Message-ID: <20150305132232.GB1504@bricha3-MOBL3> References: <1425561339-13300-1-git-send-email-michael.qiu@intel.com> <1425561339-13300-3-git-send-email-michael.qiu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: dev-VfR2kkLFssw@public.gmane.org To: Michael Qiu Return-path: Content-Disposition: inline In-Reply-To: <1425561339-13300-3-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Thu, Mar 05, 2015 at 09:15:38PM +0800, Michael Qiu wrote: > test_hash.c: In function =E2=80=98test_crc32_hash_alg_equiv=E2=80=99: > error: format =E2=80=98%lu=E2=80=99 expects argument of type =E2=80=98l= ong unsigned int=E2=80=99, > but argument 2 has type =E2=80=98size_t=E2=80=99 [-Werror=3Dformat] >=20 > According to C99, for size_t type should use formart "%zu" >=20 > Signed-off-by: Michael Qiu Typo in title. Otherwise Acked-by: Bruce Richardson > --- > app/test/test_hash.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/app/test/test_hash.c b/app/test/test_hash.c > index 653dd86..c489b8b 100644 > --- a/app/test/test_hash.c > +++ b/app/test/test_hash.c > @@ -226,7 +226,7 @@ test_crc32_hash_alg_equiv(void) > if (i =3D=3D CRC32_ITERATIONS) > return 0; > =20 > - printf("Failed test data (hex, %lu bytes total):\n", data_len); > + printf("Failed test data (hex, %zu bytes total):\n", data_len); > for (j =3D 0; j < data_len; j++) > printf("%02X%c", ((uint8_t *)data64)[j], > ((j+1) % 16 =3D=3D 0 || j =3D=3D data_len - 1) ? '\n' : ' '); > --=20 > 1.9.3 >=20