target.c (gomp_load_plugin_for_device): Use const char * instead of char * for variab...
authorIlya Tocar <ilya.tocar@intel.com>
Wed, 18 Feb 2015 13:33:43 +0000 (13:33 +0000)
committerIlya Tocar <tocarip@gcc.gnu.org>
Wed, 18 Feb 2015 13:33:43 +0000 (16:33 +0300)
libgomp/

* target.c (gomp_load_plugin_for_device): Use const char * instead of
char * for variables holding dlerror return values.
(DLSYM_OPT): Ditto.

From-SVN: r220789

libgomp/ChangeLog
libgomp/target.c

index 8477c3bf4644391d4b4e1cdb982611a369125635..96f3ca3ad87f5d16920433a9bb861c0ea1424b34 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-18  Ilya Tocar  <ilya.tocar@intel.com>
+
+       * target.c (gomp_load_plugin_for_device): Use const char * instead of
+       char * for variables holding dlerror return values.
+       (DLSYM_OPT): Ditto.
+
 2015-02-17  Thomas Schwinge  <thomas@codesourcery.com>
 
        * libgomp-plugin.c (GOMP_PLUGIN_debug): Fix typo.
index 73e757a9ec1087255455dea5e58176e236035937..50baa4d1319e5139be660e9a99e2e7f70f9c9bbe 100644 (file)
@@ -919,7 +919,7 @@ static bool
 gomp_load_plugin_for_device (struct gomp_device_descr *device,
                             const char *plugin_name)
 {
-  char *err = NULL, *last_missing = NULL;
+  const char *err = NULL, *last_missing = NULL;
   int optional_present, optional_total;
 
   /* Clear any existing error.  */
@@ -947,7 +947,7 @@ gomp_load_plugin_for_device (struct gomp_device_descr *device,
 #define DLSYM_OPT(f, n)                                                \
   do                                                                   \
     {                                                                  \
-      char *tmp_err;                                                   \
+      const char *tmp_err;                                                     \
       device->f##_func = dlsym (plugin_handle, "GOMP_OFFLOAD_" #n);    \
       tmp_err = dlerror ();                                            \
       if (tmp_err == NULL)                                             \