[Pixman] [PATCH 2/2] Fix for "syntax error: empty declaration" Solaris Studio warnings
Siarhei Siamashka
siarhei.siamashka at gmail.com
Fri Jan 7 03:06:53 PST 2011
On Tuesday 04 January 2011 23:47:02 Soeren Sandmann wrote:
> Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:
> > -MAKE_FETCHERS (none_r5g6b5, r5g6b5, PIXMAN_REPEAT_NONE);
> > -MAKE_FETCHERS (reflect_r5g6b5, r5g6b5, PIXMAN_REPEAT_REFLECT);
> > -MAKE_FETCHERS (normal_r5g6b5, r5g6b5, PIXMAN_REPEAT_NORMAL);
> > + MAKE_NEAREST_FETCHER (name, format, repeat_mode)
\
> > + MAKE_BILINEAR_FETCHER (name, format, repeat_mode)
> > +
> > +MAKE_FETCHERS (pad_a8r8g8b8, a8r8g8b8, PIXMAN_REPEAT_PAD)
> > +MAKE_FETCHERS (none_a8r8g8b8, a8r8g8b8, PIXMAN_REPEAT_NONE)
> > +MAKE_FETCHERS (reflect_a8r8g8b8, a8r8g8b8, PIXMAN_REPEAT_REFLECT)
> > +MAKE_FETCHERS (normal_a8r8g8b8, a8r8g8b8, PIXMAN_REPEAT_NORMAL)
>
> I'm curious why this is better? It's not like the dummy variable
> declarations show up in the binaries.
Well, Solaris Studio is annoying and noisy, complaining about what it thinks to
be redundant semicolons. So I assume their message was to ask us to remove
these semicolons. I find it quite ironic that even more redundancy gets added
(via dummy variables) just to silence these warnings, this looks like exactly
the opposite effect.
In any case, the current pixman code has these warnings when compiled with
Solaris Studio. It would be nice to fix them. And do this fix in a consistent
way, either by removing all the extra semicolons or by adding dummy variables
at the appropriate places.
Removing semicolons is better in my opinion because it slightly reduces the
size of source code and removes redundancy. That is unless this change may
cause some regressions.
> In any case, my only real concern was whether it would confuse emacs'
> indenting algorithm. It seems to cope, so I'm fine with this.
Right, making sure that the features like smart indentation is not broken in
the existing text editors is a good point. Any other editors worth checking?
--
Best regards,
Siarhei Siamashka
More information about the Pixman
mailing list