GNOME Bugzilla – Bug 672725
Fix some compiler warnings
Last modified: 2012-03-26 12:26:41 UTC
Created attachment 210490 [details] [review] Remove now unused or unneeded variables and functions The current state in git master (2.35.90) produces quite a lot of compiler warnings here. The following patches address some of them. In particular they don't fix warnings about pointer signedness when comparing xml strings against const chars as I don't see much sense in fixing them.
Created attachment 210491 [details] [review] Fix variables that could be accessed uninitialized Fix warnings when building with -Wuninitialized. --- rsvg-base.c | 2 +- rsvg-filter.c | 1 - 2 files changed, 1 insertions(+), 2 deletions(-)
Created attachment 210492 [details] [review] Add forgotten return value in error case Fix GCC warnings when using the -Wreturn-type parameter. --- rsvg-cairo-draw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Created attachment 210493 [details] [review] Add some extra parentheses to fix GCC warnings These can occur when using the -Wparentheses parameter. --- rsvg-css.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Review of attachment 210491 [details] [review]: ::: rsvg-base.c @@ +802,2 @@ if (type == XML_EXTERNAL_PARAMETER_ENTITY && !content) { + guint8 *entity_data = NULL; I'd rather add a catch-all |else entity_data = NULL;| on the if cascade below.
The first two patches are quite important; I'll ask r-t for approval to commit them (the 1st one with the change requested).
(In reply to comment #0) > In particular they don't fix warnings about pointer signedness when comparing > xml strings against const chars as I don't see much sense in fixing them. I think it would be worth fixing them (just either use xmlStrcmp and cast the literal string to (const xmlChar*), or strcmp and cast the xml string to (const char*).