Bug 36989 - Remove trailing comma in enum
Summary: Remove trailing comma in enum
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.10.3
Hardware: Other All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-09 00:48 UTC by Murray Cumming
Modified: 2011-06-14 11:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
0001-cairo.h-Remove-a-trailing-comma-from-an-enum.patch (1.00 KB, patch)
2011-05-09 00:48 UTC, Murray Cumming
Details | Splinter Review

Description Murray Cumming 2011-05-09 00:48:57 UTC
Created attachment 46464 [details] [review]
0001-cairo.h-Remove-a-trailing-comma-from-an-enum.patch

This small patch fixes some warnings, for instance, with cairomm.
Comment 1 Murray Cumming 2011-06-08 00:14:12 UTC
Please?
Comment 2 Andrea Canciani 2011-06-08 03:04:45 UTC
(In reply to comment #1)
> Please?

Pushed. Thank you!

commit d0615633dc1529af44740f8326ca1886a8b3bf5c
Author: Murray Cumming <murrayc@murrayc.com>
Date:   Mon May 9 09:45:06 2011 +0200

    cairo: Remove trailing comma from cairo_format_t
    
    Fixes warnings when building with C++.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36989
Comment 3 Behdad Esfahbod 2011-06-08 06:45:48 UTC
Out of curiosity, is it your C++ compiler that dislikes trailing commas?  Because in harfbuzz I'm using C++ and have assumed that trailing commas are harmless.  I don't get a warning so far.
Comment 4 Murray Cumming 2011-06-08 11:32:11 UTC
(In reply to comment #3)
> Out of curiosity, is it your C++ compiler that dislikes trailing commas? 
> Because in harfbuzz I'm using C++ and have assumed that trailing commas are
> harmless.  I don't get a warning so far.

Yes it's g++. We use a higher than normal level of warnings and we enable them as errors during distcheck so we never have them for long.
Comment 5 Behdad Esfahbod 2011-06-08 12:02:35 UTC
What's the set of flags you use?  I personally have an extensive set of compiler warning flags that I use, but cannot find one for trailing comma.  Thanks.
Comment 6 Murray Cumming 2011-06-14 11:27:58 UTC
-pedantic -Wall -Wextra(In reply to comment #5)
> What's the set of flags you use?

-pedantic -Wall -Wextra

I don't know which one turns on this warning. We find them generally useful, though this one is just generally annoying. But I've never given it much thought - I just fix it when I see it.
Comment 7 Behdad Esfahbod 2011-06-14 11:47:26 UTC
Ah, -pedantic.  Thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.