Bug 43058 - EasyHack: remove redundant double ';;' from C++ code ...
Summary: EasyHack: remove redundant double ';;' from C++ code ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium trivial
Assignee: Gustavo Pacheco
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2011-11-18 03:24 UTC by Michael Meeks
Modified: 2015-12-15 16:27 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
git patch for the double semicolon format issue (90.39 KB, patch)
2011-12-14 11:52 UTC, Jesse Spears
Details
Additional fix for EasyHack FDO43058, remove extra semicolons (2.29 KB, patch)
2011-12-15 07:05 UTC, Gustavo Pacheco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2011-11-18 03:24:41 UTC
It seems (in the past) some hackers have had some bouncy ';' keys and doubled up their ';;'s at the end of statements. In C++ this is meaningless outside a for() construct, so:

git grep ';;' | grep '\.[ch]xx' | grep -v 'for *('
...
   322	xmloff/source/text/txtexppr.cxx:            pHoriOrientRelFrameState->mnIndex = -1;;
   323	xmloff/source/text/txtexppr.cxx:            pShapeHoriOrientRelFrameState->mnIndex = -1;;
   324	xmlsecurity/source/xmlsec/saxhelper.cxx:    sal_Int32 nLength = aAttributes.getLength();;

Should be a very easy entry into cleaning things up I hope :-)
Comment 1 Gustavo Pacheco 2011-12-07 11:48:28 UTC
Assigned to myself.
Comment 2 Jesse Spears 2011-12-14 11:52:13 UTC
Created attachment 54430 [details]
git patch for the double semicolon format issue
Comment 3 Michael Meeks 2011-12-15 04:59:40 UTC
Hi Jesse, thanks for the patch - it looks like you were racing Gustavo (sorry about that Gustavo).
I reviewed it - seems there were three or so for() ;;'s that happened to be split into new lines that I removed- but otherwise this looks nice.

Thanks for the cleanup; just test-building, and will push.

Please can you send a mail of the form:

"all my contributions are licensed under the MPL/LGPLv3+ dual license"

to the developers mailing list: libreoffice@lists.freedesktop.org, so we can list you here:

http://wiki.documentfoundation.org/Development/Developers

thanks ! :-)
Comment 4 Michael Meeks 2011-12-15 05:03:16 UTC
Gustavo - it seems there are still a couple in the headers if you could take those:

$ git grep ';;' | grep \.hxx
desktop/win32/source/extendloaderenvironment.hxx:    for (;;) {
registry/inc/registry/registry.hxx:        return sRet;;
sw/inc/modcfg.hxx:                        bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();;}

I'd love to get you into the credits too :-)
Comment 5 Gustavo Pacheco 2011-12-15 05:31:41 UTC
All of us are winners in this race! Thanks Jesse! Nice work! :)

Thanks for the mentoring Michael! I'm learning a lot in the last months! I'll send the little patch today!
Comment 6 Gustavo Pacheco 2011-12-15 07:05:26 UTC
Created attachment 54461 [details]
Additional fix for EasyHack FDO43058, remove extra semicolons
Comment 7 Michael Meeks 2011-12-15 10:49:32 UTC
> All of us are winners in this race !

Nice attitude :-) thanks - I pushed your patch too (removing the for(;;) -> for(;)) fragment ';;' has a meaning inside a for.

I guess the same request with the MPL/LGPLv3+ mail to the developers list applies to you Gustavo, it'd be great to get that done - then what's next ? :-)
Comment 8 Robinson Tryon (qubit) 2015-12-15 16:27:26 UTC
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyBeginner,SkillCpp,TopicCleanup)
[NinjaEdit]