diff options
author | shynur <shynur@outlook.com> | 2025-02-17 23:06:58 +0800 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2025-02-22 22:37:50 +0100 |
commit | e759ff08e2e2e7128db7e6313b4218daa367c74f (patch) | |
tree | 0461b7c7e3afc6899dce08f7ea4d9a01838d10b9 /libgomp/target.c | |
parent | 4470229653e9e539f389d6f41d013d243d6acafb (diff) | |
download | gcc-e759ff08e2e2e7128db7e6313b4218daa367c74f.zip gcc-e759ff08e2e2e7128db7e6313b4218daa367c74f.tar.gz gcc-e759ff08e2e2e7128db7e6313b4218daa367c74f.tar.bz2 |
libgomp: Add '__attribute__((unused))' to variables used only in 'assert(...)'
Without this attribute, the building process will fail if GCC is configured
with 'CFLAGS=-DNDEBUG'.
libgomp/ChangeLog:
* oacc-mem.c (acc_unmap_data, goacc_exit_datum_1, find_group_last,
goacc_enter_data_internal): Add '__attribute__((unused))'.
* target.c (gomp_unmap_vars_internal): Likewise.
Diffstat (limited to 'libgomp/target.c')
-rw-r--r-- | libgomp/target.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgomp/target.c b/libgomp/target.c index 9fc51b1..dbc4535 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -2092,8 +2092,9 @@ gomp_unmap_vars_internal (struct target_mem_desc *tgt, bool do_copyfrom, tgt->list[i].length); if (do_remove) { - struct target_mem_desc *k_tgt = k->tgt; - bool is_tgt_unmapped = gomp_remove_var (devicep, k); + struct target_mem_desc *k_tgt __attribute__((unused)) = k->tgt; + bool is_tgt_unmapped __attribute__((unused)) + = gomp_remove_var (devicep, k); /* It would be bad if TGT got unmapped while we're still iterating over its LIST_COUNT, and also expect to use it in the following code. */ |