GCC 4.8 says: --- calligra-2.7.4/libs/kotext/styles/KoCharacterStyle.cpp:1938:42: warning: iteration 3u invokes undefined behavior [-Waggressive-loop-optimizations] --- The code is: --- for (unsigned int i = 0; i < sizeof(keepProperties); ++i) { if (hasProperty(keepProperties[i])) { keep.insert(keepProperties[i], value(keepProperties[i])); --- It should be: i < sizeof(keepProperties)/sizeof(*keepProperties) Reproducible: Always
Git commit 50a16640316616c3ce7562a6792bdc82ce11b9e5 by C. Boemann. Committed on 10/11/2013 at 11:42. Pushed by boemann into branch 'master'. Fix unsafe looping thanks Dennis for report and solution suggestion M +1 -1 libs/kotext/styles/KoCharacterStyle.cpp http://commits.kde.org/calligra/50a16640316616c3ce7562a6792bdc82ce11b9e5
Git commit 8c429e7585168e613440d07228c756109de8f2e2 by Boudewijn Rempt, on behalf of C. Boemann. Committed on 10/11/2013 at 11:42. Pushed by rempt into branch 'calligra/2.7'. Fix unsafe looping thanks Dennis for report and solution suggestion M +1 -1 libs/kotext/styles/KoCharacterStyle.cpp http://commits.kde.org/calligra/8c429e7585168e613440d07228c756109de8f2e2