GNOME Bugzilla – Bug 751679
self-assignment warning in xmlschemas.c
Last modified: 2015-06-30 02:50:25 UTC
When compiling with clang (on Windows in this case, but presumably everywhere) with -Wself-assign enabled, this is triggered: FAILED: ninja -t msvc -e environment.x64 -- "..\..\third_party/llvm-build/Release+Asserts/bin/clang-cl" -m64 /nologo /showIncludes /FC @obj\third_party\libxml\src\libxml.xmlschemas.obj.rsp /c ..\..\third_party\libxml\src\xmlschemas.c /Foobj\third_party\libxml\src\libxml.xmlschemas.obj /Fdobj\third_party\libxml\libxml.c.pdb ..\..\third_party\libxml\src\xmlschemas.c(24205,10) : error: explicitly assigning value of variable of type 'xmlSchemaValType' to itself [-Werror,-Wself-assign] valType = valType; ~~~~~~~ ^ ~~~~~~~ 1 error generated. (line 24205 at current ToT) I'm not certain whether valType needs to be computed in another way? But if not then simply if (val != NULL) valType = xmlSchemaGetValType(val); is probably a better way to write what happens at the moment.
Ack, makes sense, commited: https://git.gnome.org/browse/libxml2/commit/?id=58b84e1f822d9323b4bbadeb07ee147cccc96e7e thanks ! Daniel