From: Jakub Jelinek Date: Wed, 22 Jan 2020 16:50:14 +0000 (+0100) Subject: re PR libgomp/93219 (unused return value in affinity-fmt.c) X-Git-Tag: releases/gcc-9.3.0~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13e141515f5f9f2386c4a894326929f03fb59076;p=thirdparty%2Fgcc.git re PR libgomp/93219 (unused return value in affinity-fmt.c) PR libgomp/93219 * libgomp.h (gomp_print_string): Change return type from void to int. * affinity-fmt.c (gomp_print_string): Likewise. Return true if not all characters have been written. --- diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index bcc1b0e71317..7588fdb7a6a2 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,13 @@ +2020-01-22 Jakub Jelinek + + Backported from mainline + 2020-01-10 Jakub Jelinek + + PR libgomp/93219 + * libgomp.h (gomp_print_string): Change return type from void to int. + * affinity-fmt.c (gomp_print_string): Likewise. Return true if + not all characters have been written. + 2020-01-22 Jakub Jelinek Backported from mainline diff --git a/libgomp/affinity-fmt.c b/libgomp/affinity-fmt.c index d9c6e181233a..61417c9e5ae3 100644 --- a/libgomp/affinity-fmt.c +++ b/libgomp/affinity-fmt.c @@ -37,10 +37,10 @@ #include #endif -void +bool gomp_print_string (const char *str, size_t len) { - fwrite (str, 1, len, stderr); + return fwrite (str, 1, len, stderr) != len; } void diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h index afea659445d8..c98c1452bd4d 100644 --- a/libgomp/libgomp.h +++ b/libgomp/libgomp.h @@ -751,7 +751,7 @@ extern void gomp_display_affinity_place (char *, size_t, size_t *, int); /* affinity-fmt.c */ -extern void gomp_print_string (const char *str, size_t len); +extern bool gomp_print_string (const char *str, size_t len); extern void gomp_set_affinity_format (const char *, size_t); extern void gomp_display_string (char *, size_t, size_t *, const char *, size_t);