libimp: declaration must be at start of a block.

Fixes:

> libgimp/gimpresourceselectbutton.c:510:9: error: a label can only be part of a statement and a declaration is not a statement
> 510 |         GimpResource *specific_value;

As well as some coding style bug (space after '*').
This commit is contained in:
Jehan 2023-01-13 21:41:59 +01:00
parent d5f4cabfcc
commit 54db045f45
1 changed files with 11 additions and 9 deletions

View File

@ -501,16 +501,18 @@ gimp_resource_select_button_set_property (GObject *object,
break;
case PROP_RESOURCE:
/* Do not use the exported method set_resource.
* That is internal and less safe
* because it is agnostic of NULL values passed,
* and does not unref any existing value.
*/
GimpResource * specific_value;
{
/* Do not use the exported method set_resource.
* That is internal and less safe
* because it is agnostic of NULL values passed,
* and does not unref any existing value.
*/
GimpResource *specific_value;
specific_value = g_value_get_object (gvalue);
g_assert (specific_value != NULL);
priv->resource = specific_value;
specific_value = g_value_get_object (gvalue);
g_assert (specific_value != NULL);
priv->resource = specific_value;
}
break;
default: