Re: [libcroco-list] Declaration after statment
- From: Gaël "Chamoulaud (strider)" <strider freespiders org>
- To: Michael J Culbertson wheaton edu
- Cc: Libcroco list <libcroco-list gnome org>
- Subject: Re: [libcroco-list] Declaration after statment
- Date: Sun, 17 Aug 2003 21:20:45 +0100
Hi Michael,
Your patch is applied in the cvs.
Thanks for your contribution.
Regards
Gaël (strider)
On Sun, 2003-08-17 at 02:51, Michael J Culbertson wheaton edu wrote:
> Hello,
>
> Two files (cr-sel-eng.c.orig and cr-lay-eng.c.orig) fail to compile with
> GCC 2.95.4 due to declarations after calls to g_return_val_if_fail and the
> like. These errors probably slipped through since GCC version 3.3 silently
> accepts this non-standard syntax. An upcoming version of GCC will feature
> the -Wdeclaration-after-code flag to signal this sort of error (it's in CVS,
> but I'm not sure whether it made it into the recent 3.3.1 release). I have
> included a patch below to correct these two files.
>
> Michael Culbertson
>
> ----------------------------------------
>
> --- src/seleng/cr-sel-eng.c.origSat Aug 16 18:27:22 2003
> +++ src/seleng/cr-sel-eng.cSat Aug 16 18:29:15 2003
> @@ -130,15 +130,15 @@
> id_add_sel_matches_node (CRAdditionalSel *a_add_sel,
> xmlNode *a_node)
> {
> + gboolean result = FALSE ;
> + xmlChar *id = NULL ;
> +
> g_return_val_if_fail (a_add_sel
> && a_add_sel->type == ID_ADD_SELECTOR
> && a_add_sel->content.id_name
> && a_add_sel->content.id_name->str
> && a_node, FALSE) ;
>
> - gboolean result = FALSE ;
> - xmlChar *id = NULL ;
> -
> g_return_val_if_fail (a_add_sel
> && a_add_sel->type == ID_ADD_SELECTOR
> && a_node, FALSE) ;
> @@ -786,10 +786,10 @@
> for (cur_decl = a_stmt->kind.ruleset->decl_list ;
> cur_decl ; cur_decl = cur_decl->next)
> {
> + CRDeclaration *decl = NULL ;
> +
> if (!cur_decl->property || !cur_decl->property->str)
> continue ;
> -
> - CRDeclaration *decl = NULL ;
>
> /*
> *First, test if the property is not
> --- src/layeng/cr-lay-eng.c.origSat Aug 16 18:30:24 2003
> +++ src/layeng/cr-lay-eng.cSat Aug 16 18:32:45 2003
> @@ -1214,12 +1214,13 @@
> CRBox *a_cur_box)
> {
> enum CRStatus status = CR_OK ;
> + CRBox *cont_box = NULL;
>
> g_return_val_if_fail (a_cur_box && a_cur_box->style,
> CR_BAD_PARAM_ERROR) ;
> -
> - CRBox *cont_box = a_cur_box->parent ;
> + cont_box = a_cur_box->parent ;
>
> +
> /************************************
> *We are in a block formating context
> ************************************/
> _______________________________________________
> Libcroco-list mailing list
> Libcroco-list gnome org
> http://mail.gnome.org/mailman/listinfo/libcroco-list
--
--
Gaël CHAMOULAUD (strider)
strider gnome org
--------------------------------------------
Gnome-mlview, a simple XML editor for GNOME
http://www.freespiders.org/projects/gmlview
--------------------------------------------
Libcroco, GNOME CSS2 parsing toolkit
http://www.freespiders.org/projects/libcroco
--------------------------------------------
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]