Fwd: [glennrp/libpng] Apple clang 8.1.0 warnings (#156)
Glenn Randers-Pehrson <[email protected]>
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <CA+PdXcubUO2Bf9j_Vp7T82NCM1=eyuWhjNZGaZB_vZpjE-T3LA@mail.gmail.com> |
New libpng warnings. I don't know why clang is objecting to
what seems to be valid use of the comma. The warning messages
hint that using "(void)" would suppress the warnings.
I suspect that in most cases the warning could also be suppressed
by using semicolons instead of commas, and adding braces
if necessary, as in
if (test <= DBL_MAX)
{
++exp_b10; base=test;
}
in place of
if (test <= DBL_MAX)
++exp_b10, base = test;
Glenn
---------- Forwarded message ----------
From: Viktor Szakats <notifications-9UaJU3cA/F/[email protected]>
Date: Wed, Mar 29, 2017 at 5:56 AM
Subject: [glennrp/libpng] Apple clang 8.1.0 warnings (#156)
To: glennrp/libpng <[email protected]>
Cc: Subscribed <[email protected]>
After this week's toolchain updates, the following, mostly -Wcomma warnings
appeared. Also included some existing const stripping warnings. This is so
when building libpng with -Weverything option, I haven't tested with other
warning levels. Anyhow some of these *may* be useful information.
png.c:2835:16: warning: possible misuse of comma operator here [-Wcomma]
recip = 1, power = -power;
^
png.c:2835:7: note: cast expression to void to silence warning
recip = 1, power = -power;
^~~~~~~~~
(void)( )
png.c:2913:25: warning: possible misuse of comma operator here [-Wcomma]
++exp_b10, base = test;
^
png.c:2913:16: note: cast expression to void to silence warning
++exp_b10, base = test;
^~~~~~~~~
(void)( )
[snip]
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
png-mng-implement mailing list
png-mng-implement-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/png-mng-implement