[Mesa-dev] [Bug 28845] The GLU tesselator code has some warnings
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jun 30 04:59:56 PDT 2010
https://bugs.freedesktop.org/show_bug.cgi?id=28845
--- Comment #1 from Neil Roberts <neil at linux.intel.com> 2010-06-30 04:59:56 PDT ---
Created an attachment (id=36633)
View: https://bugs.freedesktop.org/attachment.cgi?id=36633
Review: https://bugs.freedesktop.org/review?bug=28845&attachment=36633
Fix some compiler warnings in libtess
When compiled with the more aggressive compiler warnings such as
-Wshadow and -Wempty-body the libtess code gives a lot more
warnings. This fixes the following issues:
* The 'Swap' macro tries to combine multiple statements into one and
then consume the trailing semicolon by using if(1){/*...*/}else.
This gives warnings because the else part ends up with an empty
statement. It also seems a bit dangerous because if the semicolon
were missed then it would still be valid syntax but it would just
ignore the following statement. This patch replaces it with the more
common idiom do { /*...*/ } while(0).
* 'free' was being used as a local variable name but this shadows the
global function. This has been renamed to 'free_handle'
* TRUE and FALSE were being unconditionally defined. Although this
isn't currently a problem it seems better to guard them with #ifndef
because it's quite common for them to be defined in other headers.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the mesa-dev
mailing list