From: Bruno Haible Date: Fri, 2 Jun 2023 23:33:22 +0000 (+0200) Subject: Silence "use of possibly-NULL ‘string’ where non-null expected" warning. X-Git-Tag: v0.22~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6721eb67df863253180e455832519940b6069a6;p=thirdparty%2Fgettext.git Silence "use of possibly-NULL ‘string’ where non-null expected" warning. * gettext-tools/src/write-po.c (make_range_description_string): Assume that this xasprintf call returns non-NULL. --- diff --git a/gettext-tools/src/write-po.c b/gettext-tools/src/write-po.c index 7bc4ee692..875ced539 100644 --- a/gettext-tools/src/write-po.c +++ b/gettext-tools/src/write-po.c @@ -121,7 +121,9 @@ has_significant_format_p (const enum is_format is_format[NFORMATS]) char * make_range_description_string (struct argument_range range) { - return xasprintf ("range: %d..%d", range.min, range.max); + char *result = xasprintf ("range: %d..%d", range.min, range.max); + assume (result != NULL); + return result; }