aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2020-04-26 09:26:39 +0200
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2020-04-30 07:53:02 +0200
commit3c9450bf5c5c71945ec4474cd0f8bf830e431806 (patch)
tree59ebdd47bd9f40d8dcc91cbeea98fb36e0af8245 /gcc/tree.c
parent3144d1aa56a6e309d2d2bbaa2ab061f157eef1e2 (diff)
downloadgcc-3c9450bf5c5c71945ec4474cd0f8bf830e431806.zip
gcc-3c9450bf5c5c71945ec4474cd0f8bf830e431806.tar.gz
gcc-3c9450bf5c5c71945ec4474cd0f8bf830e431806.tar.bz2
toplev.c: Check for null argument to fprintf
Ensure that CF does not equal NULL in function output_stack_usage_1 before calling fprintf. This fixes the following warning/error: gcc/toplev.c:976:13: error: argument 1 null where non-null expected [-Werror=nonnull] 976 | fprintf (cf, "\\n" HOST_WIDE_INT_PRINT_DEC " bytes (%s)", | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 977 | stack_usage, | ~~~~~~~~~~~~ 978 | stack_usage_kind_str[stack_usage_kind]); An example call side where CF is NULL is in function output_stack_usage. gcc/ChangeLog: 2020-04-30 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> * toplev.c (output_stack_usage_1): Ensure that first argument to fprintf is not null.
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions