summaryrefslogtreecommitdiff
path: root/png.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-03-30 13:39:23 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-03-30 13:39:23 -0500
commitece16010328a4c830c0cb8d8ff76da38546476c9 (patch)
treed06272c72c0c7ad0d2106cef78b982ad7cce669b /png.c
parent3e878e3f8dac475c2e4ef8b929565e86f37c1803 (diff)
downloadlibpng-ece16010328a4c830c0cb8d8ff76da38546476c9.tar.gz
[libpng15] Silence clang -Wcomma warnings (Viktor SzaKats).
Diffstat (limited to 'png.c')
-rw-r--r--png.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/png.c b/png.c
index a9e75cca9..663d9a48c 100644
--- a/png.c
+++ b/png.c
@@ -656,14 +656,14 @@ png_get_copyright(png_const_structp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.5.29beta01 - March 1, 2017" PNG_STRING_NEWLINE \
+ "libpng version 1.5.29beta01 - March 30, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
- return "libpng version 1.5.29beta01 - March 1, 2017\
+ return "libpng version 1.5.29beta01 - March 30, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -1507,7 +1507,7 @@ png_pow10(int power)
if (power < 0)
{
if (power < DBL_MIN_10_EXP) return 0;
- recip = 1, power = -power;
+ recip = 1; power = -power;
}
if (power > 0)
@@ -1585,7 +1585,9 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
double test = png_pow10(exp_b10+1);
if (test <= DBL_MAX)
- ++exp_b10, base = test;
+ {
+ ++exp_b10; base = test;
+ }
else
break;
@@ -1599,7 +1601,10 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
* test on DBL_MAX above.
*/
fp /= base;
- while (fp >= 1) fp /= 10, ++exp_b10;
+ while (fp >= 1)
+ {
+ fp /= 10; ++exp_b10;
+ }
/* Because of the code above fp may, at this point, be
* less than .1, this is ok because the code below can
@@ -1651,7 +1656,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
/* Rounding up to 10, handle that here. */
if (czero > 0)
{
- --czero, d = 1;
+ --czero; d = 1;
if (cdigits == 0) --clead;
}
@@ -1666,7 +1671,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
else if (ch == 46)
{
- ch = *--ascii, ++size;
+ ch = *--ascii; ++size;
/* Advance exp_b10 to '1', so that the
* decimal point happens after the
* previous digit.
@@ -1693,7 +1698,9 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
int ch = *--ascii;
if (ch == 46)
- ++size, exp_b10 = 1;
+ {
+ ++size; exp_b10 = 1;
+ }
/* Else lost a leading zero, so 'exp_b10' is
* still ok at (-1)
@@ -1785,7 +1792,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
*/
size -= cdigits;
- *ascii++ = 69, --size; /* 'E': PLUS 1 TOTAL 2+precision */
+ *ascii++ = 69; --size; /* 'E': PLUS 1 TOTAL 2+precision */
/* The following use of an unsigned temporary avoids ambiguities in
* the signed arithmetic on exp_b10 and permits GCC at least to do
@@ -1796,7 +1803,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
if (exp_b10 < 0)
{
- *ascii++ = 45, --size; /* '-': PLUS 1 TOTAL 3+precision */
+ *ascii++ = 45; --size; /* '-': PLUS 1 TOTAL 3+precision */
uexp_b10 = -exp_b10;
}
@@ -1901,7 +1908,10 @@ png_ascii_from_fixed(png_structp png_ptr, png_charp ascii, png_size_t size,
* then ndigits digits to first:
*/
i = 5;
- while (ndigits < i) *ascii++ = 48, --i;
+ while (ndigits < i)
+ {
+ *ascii++ = 48; --i;
+ }
while (ndigits >= first) *ascii++ = digits[--ndigits];
/* Don't output the trailing zeros! */
}