mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-03 00:34:21 +08:00
libgomp plugin - init string
libgomp/ 2019-09-13 Tobias Burnus <tobias@codesourcery.com> * plugin/plugin-hsa.c (hsa_warn, hsa_fatal, hsa_error): Ensure string is initialized. From-SVN: r275703
This commit is contained in:
parent
a6fa2e83e9
commit
c28712beb4
@ -1,3 +1,8 @@
|
||||
2019-09-13 Tobias Burnus <tobias@codesourcery.com>
|
||||
|
||||
* plugin/plugin-hsa.c (hsa_warn, hsa_fatal, hsa_error): Ensure
|
||||
string is initialized.
|
||||
|
||||
2019-09-06 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
@ -289,7 +289,7 @@ hsa_warn (const char *str, hsa_status_t status)
|
||||
if (!debug)
|
||||
return;
|
||||
|
||||
const char *hsa_error_msg;
|
||||
const char *hsa_error_msg = "[unknown]";
|
||||
hsa_fns.hsa_status_string_fn (status, &hsa_error_msg);
|
||||
|
||||
fprintf (stderr, "HSA warning: %s\nRuntime message: %s", str, hsa_error_msg);
|
||||
@ -301,7 +301,7 @@ hsa_warn (const char *str, hsa_status_t status)
|
||||
static void
|
||||
hsa_fatal (const char *str, hsa_status_t status)
|
||||
{
|
||||
const char *hsa_error_msg;
|
||||
const char *hsa_error_msg = "[unknown]";
|
||||
hsa_fns.hsa_status_string_fn (status, &hsa_error_msg);
|
||||
GOMP_PLUGIN_fatal ("HSA fatal error: %s\nRuntime message: %s", str,
|
||||
hsa_error_msg);
|
||||
@ -313,7 +313,7 @@ hsa_fatal (const char *str, hsa_status_t status)
|
||||
static bool
|
||||
hsa_error (const char *str, hsa_status_t status)
|
||||
{
|
||||
const char *hsa_error_msg;
|
||||
const char *hsa_error_msg = "[unknown]";
|
||||
hsa_fns.hsa_status_string_fn (status, &hsa_error_msg);
|
||||
GOMP_PLUGIN_error ("HSA fatal error: %s\nRuntime message: %s", str,
|
||||
hsa_error_msg);
|
||||
|
Loading…
Reference in New Issue
Block a user