# HG changeset patch # User Jim Meyering # Date 1113288903 0 # Node ID 2ef479ccc298abcc9b0fbbd2185eda796ce710d5 # Parent 9c7ebeafbfa7cbc2c8dd3255ae3bcd5fa8a19657 (humblock): Set *options even when returning due to xstrtoumax conversion failure. Thanks to a used-uninitialized warning from gcc-4. diff --git a/lib/human.c b/lib/human.c --- a/lib/human.c +++ b/lib/human.c @@ -451,7 +451,10 @@ strtol_error e = xstrtoumax (spec, &ptr, 0, block_size, "eEgGkKmMpPtTyYzZ0"); if (e != LONGINT_OK) - return e; + { + *options = 0; + return e; + } for (; ! ('0' <= *spec && *spec <= '9'); spec++) if (spec == ptr) {