This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, testsuite]: Avoid -Wformat warnings in guality.h


The patch avoids following -Wformat warnings for 64bit targets:

guality.h: In function ‘guality_check’:
guality.h:366:19: warning: format ‘%lli’ expects argument of type
‘long long int’, but argument 4 has type ‘gualchk_t’ {aka ‘long int’}
[-Wformat=]
  fprintf (stderr, "PASS: " GUALITY_TEST ": %s is %lli\n", name, value);

2017-12-17  Uros Bizjak  <ubizjak@gmail.com>

    * gcc.dg/guality/guality.h (guality_check): Cast %lli arguments
    inf fprintf statements to long long int.

Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN.

Uros.

Attachment: t.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]