You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ 85%] Building C object cli/CMakeFiles/ezxml.c.o
/home/cli/ezxml.c: In function 'ezxml_internal_dtd':
/home/cli/ezxml.c:364:26: warning: operation on 's' may be undefined [-Wsequence-point]
while (*(n = ++s + strspn(s, EZXML_WS)) && *n != '>') {
^
Possible fixes
My suggestion would be removing the inline condition expression, and adopting an multi-line expression instead.
Such as
while (*n != '>') {
++s;
if (*(n = s + strspn(s, EZXML_WS)) == 0) { break; }
...
Labels
/label ~bug ~reproduced ~needs-investigation
The text was updated successfully, but these errors were encountered:
Summary
Compilation warning arise in ezxml.c for gcc compiler to parse an inline expression of condition which breaks a while loop.
The code snippet triggering the warning took place in line 364, inside function
ezxml_internal_dtd()
, which aims to parse default attributes such as .Steps to reproduce
The environment is under CentOS Linux release 7.9.2009 (Core), with gcc (GCC) 7.3.0.
Compilation rules were defined ias below, with ezxml.h located in ${PROJECT_BINARY_DIR} and ezxml.c in the same directory with CMakeList.txt.
What is the current bug(warning) behavior?
gcc shows warning as below:
Possible fixes
My suggestion would be removing the inline condition expression, and adopting an multi-line expression instead.
Such as
Labels
/label ~bug ~reproduced ~needs-investigation
The text was updated successfully, but these errors were encountered: