libgomp/target.c: Silence -Wuninitialized warning
authorTobias Burnus <tobias@codesourcery.com>
Tue, 15 Sep 2020 19:28:40 +0000 (21:28 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 15 Sep 2020 19:28:40 +0000 (21:28 +0200)
libgomp/ChangeLog:

PR fortran/96668
* target.c (gomp_map_vars_internal): Initialize has_nullptr.

libgomp/target.c

index 69cdd9f14a9758f6ec1d61a04da57b6fb28e9878..ab7ac9ba8d299ae6826f3e6a5a00463011d5458f 100644 (file)
@@ -854,7 +854,7 @@ gomp_map_vars_internal (struct gomp_device_descr *devicep,
          int always_to_cnt = 0;
          if ((kind & typemask) == GOMP_MAP_TO_PSET)
            {
-             bool has_nullptr;
+             bool has_nullptr = false;
              size_t j;
              for (j = 0; j < n->tgt->list_count; j++)
                if (n->tgt->list[j].key == n)
@@ -1017,7 +1017,7 @@ gomp_map_vars_internal (struct gomp_device_descr *devicep,
               == GOMP_MAP_TO_PSET)
          {
            splay_tree_key k = tgt->list[i].key;
-           bool has_nullptr;
+           bool has_nullptr = false;
            size_t j;
            for (j = 0; j < k->tgt->list_count; j++)
              if (k->tgt->list[j].key == k)