Summary: | calendar(1): calendar' preprocessor process comments | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Romain Tartière <romain> | ||||||||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||||||||
Status: | Closed Overcome By Events | ||||||||||||
Severity: | Affects Only Me | CC: | gonzo | ||||||||||
Priority: | Normal | ||||||||||||
Version: | 10.0-STABLE | ||||||||||||
Hardware: | Any | ||||||||||||
OS: | Any | ||||||||||||
Attachments: |
|
Description
Romain Tartière
2014-01-31 08:50:00 UTC
This issue is caused by the reimplementation of some cpp features in the application, to get rid of cpp itself. The implementation lacks the removal of c-style /* */ comments completely. This bug seems to be a duplicate / same issue as PR: bin/184648 Attached is a patch that removes single-line and multi-line comments included in the calendar files by removing them in the temporary buffer. This patch fixes this issue and bin/184648. Feel free to give me some feedback about the code (style) itself, the report followup itself, etc.. sorry wrong patch file, patch again - correct version. Hi Oliver, On Wed, Feb 19, 2014 at 06:16:25PM +0100, oliver wrote: > sorry wrong patch file, patch again - correct version. After applying this patch, I confirm this problem is fixed. > + } else if (idx_ts != NULL && idx_te == NULL) { > + if (cf == 0) { > + cf = 1; > + while (buf++ != idx_ts); ^^^^^^^^^^^^^^^^^^^^^^^ While copying/pasting the patch, this line confused me a bit. Isn't it more obvious to write this as a simple assignment ? > buf = idx_ts + 1; Thanks! Romain -- Romain Tartière <romain@blogreen.org> http://romain.blogreen.org/ pgp: 8234 9A78 E7C0 B807 0B59 80FF BA4D 1D95 5112 336F (ID: 0x5112336F) (plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated) Hello Romain, that is very true...when removing the original block, I didn't remove the while condition, even stepping through is not anymore required. Sorry, I will fix that. For so long, please don't commit the patch. I'm digging a bit deeper for PR: bin/162211 and found another issue..please stand by, will post the corrected version shortly...but need to make other tests first. Greetings, Oliver >Hi Oliver, >On Wed, Feb 19, 2014 at 06:16:25PM +0100, oliver wrote: >> sorry wrong patch file, patch again - correct version. >After applying this patch, I confirm this problem is fixed. >> + } else if (idx_ts != NULL && idx_te == NULL) { >> + if (cf == 0) { >> + cf = 1; >> + while (buf++ != idx_ts); > ^^^^^^^^^^^^^^^^^^^^^^^ >While copying/pasting the patch, this line confused me a bit. Isn't it >more obvious to write this as a simple assignment ? >> buf = idx_ts + 1; >Thanks! >Romain okay, here is my final patch for this issue and issue bin/184648 I modified my original patch for removing multiple inline comments. I tested it against an original version of calendar and did not find any additional issues. Greetings, Oliver For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped Closing as OBE since the affected file was removed as a part of calendar parser rework in base r279597 |