Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QV4::ReturnedValue
- QQuickJSContext2DPrototype::method_createPattern(....)
- {
- ....
- if (repetition == QStringLiteral("repeat") ||
- repetition.isEmpty()) {
- pattern->patternRepeatX = true;
- pattern->patternRepeatY = true;
- } else if (repetition == QStringLiteral("repeat-x")) {
- pattern->patternRepeatX = true;
- } else if (repetition == QStringLiteral("repeat-y")) {
- pattern->patternRepeatY = true;
- } else if (repetition == QStringLiteral("no-repeat")) {
- pattern->patternRepeatY = false;
- pattern->patternRepeatY = false;
- } else {
- //TODO: exception: SYNTAX_ERR
- }
- ....
- }
- This suspicious code was found in QT project by PVS-Studio static code analyzer.
- Warning message is:
- V519 The 'pattern->patternRepeatY' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1775, 1776. qquickcontext2d.cpp 1776
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment