Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33950
Change subject: util/nvramtool: Mark out_of_memory() as noreturn ......................................................................
util/nvramtool: Mark out_of_memory() as noreturn
This silences several false positives from scan-build.
Change-Id: I327a967c75d6aeec0b3aba16ee696dbae8cf997d Signed-off-by: Jacob Garber jgarber1@ualberta.ca --- M util/nvramtool/common.c M util/nvramtool/common.h 2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/33950/1
diff --git a/util/nvramtool/common.c b/util/nvramtool/common.c index 8ae6ea8..9b0a6b9 100644 --- a/util/nvramtool/common.c +++ b/util/nvramtool/common.c @@ -56,7 +56,7 @@ * * We ran out of memory. Print an error message and die. ****************************************************************************/ -void out_of_memory(void) +_Noreturn void out_of_memory(void) { fprintf(stderr, "%s: Out of memory.\n", prog_name); exit(1); diff --git a/util/nvramtool/common.h b/util/nvramtool/common.h index 559e80f..19ce566 100644 --- a/util/nvramtool/common.h +++ b/util/nvramtool/common.h @@ -76,7 +76,7 @@ extern const char prog_version[];
int get_line_from_file(FILE * f, char line[], int line_buf_size); -void out_of_memory(void); +_Noreturn void out_of_memory(void); void usage(FILE * outfile);
#endif /* COMMON_H */
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33950 )
Change subject: util/nvramtool: Mark out_of_memory() as noreturn ......................................................................
Patch Set 1: Code-Review+1
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33950 )
Change subject: util/nvramtool: Mark out_of_memory() as noreturn ......................................................................
Patch Set 1: Code-Review+2
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33950 )
Change subject: util/nvramtool: Mark out_of_memory() as noreturn ......................................................................
util/nvramtool: Mark out_of_memory() as noreturn
This silences several false positives from scan-build.
Change-Id: I327a967c75d6aeec0b3aba16ee696dbae8cf997d Signed-off-by: Jacob Garber jgarber1@ualberta.ca Reviewed-on: https://review.coreboot.org/c/coreboot/+/33950 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Reviewed-by: Martin Roth martinroth@google.com --- M util/nvramtool/common.c M util/nvramtool/common.h 2 files changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved HAOUAS Elyes: Looks good to me, but someone else must approve
diff --git a/util/nvramtool/common.c b/util/nvramtool/common.c index 8ae6ea8..9b0a6b9 100644 --- a/util/nvramtool/common.c +++ b/util/nvramtool/common.c @@ -56,7 +56,7 @@ * * We ran out of memory. Print an error message and die. ****************************************************************************/ -void out_of_memory(void) +_Noreturn void out_of_memory(void) { fprintf(stderr, "%s: Out of memory.\n", prog_name); exit(1); diff --git a/util/nvramtool/common.h b/util/nvramtool/common.h index 559e80f..19ce566 100644 --- a/util/nvramtool/common.h +++ b/util/nvramtool/common.h @@ -76,7 +76,7 @@ extern const char prog_version[];
int get_line_from_file(FILE * f, char line[], int line_buf_size); -void out_of_memory(void); +_Noreturn void out_of_memory(void); void usage(FILE * outfile);
#endif /* COMMON_H */