diff options
| author | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-26 01:00:24 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-26 01:00:24 +0000 |
| commit | a5c919f46c359f26433cb42a82bb99fbb729a467 (patch) | |
| tree | a9d00aafdfa2cb160257d25ebeae78f6a6d6ca30 /src/libcroco | |
| parent | tiny bugfix for Taper Strokes (diff) | |
| parent | make it easier for people to build with -Werror on Windows (diff) | |
| download | inkscape-a5c919f46c359f26433cb42a82bb99fbb729a467.tar.gz inkscape-a5c919f46c359f26433cb42a82bb99fbb729a467.zip | |
Update to trunk
Massive cleanup of outlining code
(bzr r13090.1.31)
Diffstat (limited to 'src/libcroco')
| -rw-r--r-- | src/libcroco/cr-om-parser.c | 26 | ||||
| -rw-r--r-- | src/libcroco/cr-parser.c | 18 |
2 files changed, 30 insertions, 14 deletions
diff --git a/src/libcroco/cr-om-parser.c b/src/libcroco/cr-om-parser.c index ea622e35c..c1acb855c 100644 --- a/src/libcroco/cr-om-parser.c +++ b/src/libcroco/cr-om-parser.c @@ -39,6 +39,9 @@ struct _CROMParserPriv { #define PRIVATE(a_this) ((a_this)->priv) +// Unfortunately, C does not allow unnamed function arguments, so use this macro instead... +#define UNUSED(x) (void)(x) + /* *Forward declaration of a type defined later *in this file. @@ -207,6 +210,8 @@ static void start_font_face (CRDocHandler * a_this, CRParsingLocation *a_location) { + UNUSED(a_location); + enum CRStatus status = CR_OK; ParsingContext *ctxt = NULL; ParsingContext **ctxtptr = NULL; @@ -302,6 +307,8 @@ static void charset (CRDocHandler * a_this, CRString * a_charset, CRParsingLocation *a_location) { + UNUSED(a_location); + enum CRStatus status = CR_OK; CRStatement *stmt = NULL, *stmt2 = NULL; @@ -340,6 +347,8 @@ start_page (CRDocHandler * a_this, CRString * a_pseudo, CRParsingLocation *a_location) { + UNUSED(a_location); + enum CRStatus status = CR_OK; ParsingContext *ctxt = NULL; ParsingContext **ctxtptr = NULL; @@ -381,6 +390,9 @@ end_page (CRDocHandler * a_this, CRString * a_page, CRString * a_pseudo_page) { + UNUSED(a_page); + UNUSED(a_pseudo_page); + enum CRStatus status = CR_OK; ParsingContext *ctxt = NULL; ParsingContext **ctxtptr = NULL; @@ -407,8 +419,6 @@ end_page (CRDocHandler * a_this, cr_statement_destroy (ctxt->cur_stmt); ctxt->cur_stmt = NULL; } - a_page = NULL; /*keep compiler happy */ - a_pseudo_page = NULL; /*keep compiler happy */ } static void @@ -416,6 +426,8 @@ start_media (CRDocHandler * a_this, GList * a_media_list, CRParsingLocation *a_location) { + UNUSED(a_location); + enum CRStatus status = CR_OK; ParsingContext *ctxt = NULL; ParsingContext **ctxtptr = NULL; @@ -444,6 +456,8 @@ start_media (CRDocHandler * a_this, static void end_media (CRDocHandler * a_this, GList * a_media_list) { + UNUSED(a_media_list); + enum CRStatus status = CR_OK; ParsingContext *ctxt = NULL; ParsingContext **ctxtptr = NULL; @@ -470,7 +484,6 @@ end_media (CRDocHandler * a_this, GList * a_media_list) ctxt->cur_stmt = NULL ; ctxt->cur_media_stmt = NULL ; - a_media_list = NULL; } static void @@ -480,6 +493,9 @@ import_style (CRDocHandler * a_this, CRString * a_uri_default_ns, CRParsingLocation *a_location) { + UNUSED(a_uri_default_ns); + UNUSED(a_location); + enum CRStatus status = CR_OK; CRString *uri = NULL; CRStatement *stmt = NULL, @@ -530,7 +546,6 @@ import_style (CRDocHandler * a_this, cr_statement_destroy (stmt); stmt = NULL; } - a_uri_default_ns = NULL; /*keep compiler happy */ } static void @@ -557,6 +572,8 @@ start_selector (CRDocHandler * a_this, CRSelector * a_selector_list) static void end_selector (CRDocHandler * a_this, CRSelector * a_selector_list) { + UNUSED(a_selector_list); + enum CRStatus status = CR_OK; ParsingContext *ctxt = NULL; ParsingContext **ctxtptr = NULL; @@ -604,7 +621,6 @@ end_selector (CRDocHandler * a_this, CRSelector * a_selector_list) } } - a_selector_list = NULL; /*keep compiler happy */ } static void diff --git a/src/libcroco/cr-parser.c b/src/libcroco/cr-parser.c index 41d3eab5a..69b521496 100644 --- a/src/libcroco/cr-parser.c +++ b/src/libcroco/cr-parser.c @@ -78,7 +78,7 @@ typedef struct _CRParserError CRParserError; *parsing routines. */ struct _CRParserError { - guchar *msg; + gchar *msg; enum CRStatus status; glong line; glong column; @@ -374,11 +374,11 @@ static enum CRStatus cr_parser_parse_simple_selector (CRParser * a_this, static enum CRStatus cr_parser_parse_simple_sels (CRParser * a_this, CRSimpleSel ** a_sel); -static CRParserError *cr_parser_error_new (const guchar * a_msg, +static CRParserError *cr_parser_error_new (const gchar * a_msg, enum CRStatus); static void cr_parser_error_set_msg (CRParserError * a_this, - const guchar * a_msg); + const gchar * a_msg); static void cr_parser_error_dump (CRParserError * a_this); @@ -392,7 +392,7 @@ static void cr_parser_error_destroy (CRParserError * a_this); static enum CRStatus cr_parser_push_error (CRParser * a_this, - const guchar * a_msg, + const gchar * a_msg, enum CRStatus a_status); static enum CRStatus cr_parser_dump_err_stack (CRParser * a_this, @@ -411,7 +411,7 @@ static enum CRStatus *@return the newly built instance of #CRParserError. */ static CRParserError * -cr_parser_error_new (const guchar * a_msg, enum CRStatus a_status) +cr_parser_error_new (const gchar * a_msg, enum CRStatus a_status) { CRParserError *result = NULL; @@ -436,7 +436,7 @@ cr_parser_error_new (const guchar * a_msg, enum CRStatus a_status) *@param a_msg the new message. */ static void -cr_parser_error_set_msg (CRParserError * a_this, const guchar * a_msg) +cr_parser_error_set_msg (CRParserError * a_this, const gchar * a_msg) { g_return_if_fail (a_this); @@ -515,7 +515,7 @@ cr_parser_error_destroy (CRParserError * a_this) */ static enum CRStatus cr_parser_push_error (CRParser * a_this, - const guchar * a_msg, enum CRStatus a_status) + const gchar * a_msg, enum CRStatus a_status) { enum CRStatus status = CR_OK; @@ -2430,14 +2430,14 @@ cr_parser_parse_stylesheet (CRParser * a_this) import_string, NULL, &location) ; - if ((PRIVATE (a_this)->sac_handler->resolve_import == TRUE)) { + if (PRIVATE (a_this)->sac_handler->resolve_import == TRUE) { /* *TODO: resolve the *import rule. */ } - if ((PRIVATE (a_this)->sac_handler->import_style_result)) { + if (PRIVATE (a_this)->sac_handler->import_style_result) { PRIVATE (a_this)->sac_handler->import_style_result (PRIVATE (a_this)->sac_handler, media_list, import_string, |
