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.

(cherry picked from commit 2e6af22686)
This commit is contained in:
Nils Philippsen 2013-11-28 17:43:14 +01:00
parent 779264f237
commit fc7fce4bc9

View file

@ -952,7 +952,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);
@ -997,7 +997,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);
@ -1063,7 +1063,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);