mirror of https://github.com/GNOME/gimp.git
initialize length to appease cppcheck
The code was technically correct previously: It wrote the uninitialized length only as a placeholder to overwrite it later on. Yet it's better to not confuse tools (or people) analysing the code. Besides that having 0 for the length in the file while the payload is being written may aid debugging e.g. crashes in that code later on.
This commit is contained in:
parent
99937ddfce
commit
2e6af22686
|
@ -1011,7 +1011,7 @@ xcf_save_prop (XcfInfo *info,
|
|||
|
||||
if (gimp_parasite_list_persistent_length (list) > 0)
|
||||
{
|
||||
guint32 base, length;
|
||||
guint32 base, length = 0;
|
||||
long pos;
|
||||
|
||||
xcf_write_prop_type_check_error (info, prop_type);
|
||||
|
@ -1056,7 +1056,7 @@ xcf_save_prop (XcfInfo *info,
|
|||
|
||||
case PROP_PATHS:
|
||||
{
|
||||
guint32 base, length;
|
||||
guint32 base, length = 0;
|
||||
glong pos;
|
||||
|
||||
xcf_write_prop_type_check_error (info, prop_type);
|
||||
|
@ -1122,7 +1122,7 @@ xcf_save_prop (XcfInfo *info,
|
|||
|
||||
case PROP_VECTORS:
|
||||
{
|
||||
guint32 base, length;
|
||||
guint32 base, length = 0;
|
||||
glong pos;
|
||||
|
||||
xcf_write_prop_type_check_error (info, prop_type);
|
||||
|
|
Loading…
Reference in New Issue