Closed Bug 486774 Opened 11 years ago Closed 5 years ago
Quell compiler warning on Sun
Pro CC in addition to GCC
Currently, code checks for GCC to initialize variables to NULL to prevent a compiler warning. SunPro CC also emits warnings, so the #ifdef should be extended to cover that compiler as well. I'd vote that rather than adding more #ifdef noise, the variables just always be initialized to NULL. I'll attach patches for both options and leave it up to the reviewer.
Attachment #370973 - Flags: review?(brendan)
Comment on attachment 370973 [details] [diff] [review] patch to extend existing #ifdef logic to cover __SUNPRO_CC Not brendan but this looks harmless.
Comment on attachment 370975 [details] [diff] [review] patch to remove #ifdefs completely and initialize vars to NULL I am fine with either. Any compiler worth a penny will eliminate the redundant NULL writes.
Rebased old patch, simply initialize the two stack vars to NULL to get rid of ugly __GNUC__ ifdef since other compilers complain too.
Comment on attachment 569265 [details] [diff] [review] Always initialize two stack variables instead of only when using g++. Assuming this doesn't apply at this point. Feel free to r? me for it if it still works and you want it.
Code is obsolete now.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.