]> gcc.gnu.org Git - gcc.git/commitdiff
liboffloadmic plugin: Address -Wnarrowing diagnostics
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 8 Jul 2015 15:47:59 +0000 (17:47 +0200)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Wed, 8 Jul 2015 15:47:59 +0000 (17:47 +0200)
    libtool: compile:  [...]/build-gcc/./gcc/xg++ [...] -c [...]/source-gcc/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp [...]
    In file included from [...]/source-gcc/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp:40:0:
    [...]/install/offload-x86_64-intelmicemul-linux-gnu/lib/gcc/x86_64-intelmicemul-linux-gnu/6.0.0/include/main_target_image.h:8628:1: error: narrowing conversion of '192' from 'int' to 'char' inside { } [-Wnarrowing]
     };
     ^
    [...]/install/offload-x86_64-intelmicemul-linux-gnu/lib/gcc/x86_64-intelmicemul-linux-gnu/6.0.0/include/main_target_image.h:8628:1: error: narrowing conversion of '192' from 'int' to 'char' inside { } [-Wnarrowing]
    [...]/install/offload-x86_64-intelmicemul-linux-gnu/lib/gcc/x86_64-intelmicemul-linux-gnu/6.0.0/include/main_target_image.h:8628:1: error: narrowing conversion of '164' from 'int' to 'char' inside { } [-Wnarrowing]
    [many more]

liboffloadmic/
* plugin/Makefile.am (main_target_image.h): Change type of data
member in struct MainTargetImage to uint8_t.
* plugin/Makefile.in: Regenerate.

From-SVN: r225562

liboffloadmic/ChangeLog
liboffloadmic/plugin/Makefile.am
liboffloadmic/plugin/Makefile.in

index 01fb9f441870aaa449689c0786b5935d5f099e32..b0f9e90187f2332890408594bb6faac6bb213f51 100644 (file)
@@ -1,3 +1,9 @@
+2015-07-08  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * plugin/Makefile.am (main_target_image.h): Change type of data
+       member of struct MainTargetImage to uint8_t.
+       * plugin/Makefile.in: Regenerate.
+
 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
 
        * Makefile.in: Regenerated with automake-1.11.6.
index a814f0cb451c15bbbf9f73f1dde1fcf80588eafb..19d69ab1044db0f6f930f2ec20344c01477d6d71 100644 (file)
@@ -69,7 +69,7 @@ main_target_image.h: offload_target_main
        @echo "struct MainTargetImage {" >> $@
        @echo "  int64_t size;" >> $@
        @echo "  char name[sizeof \"offload_target_main\"];" >> $@
-       @echo "  char data[image_size];" >> $@
+       @echo "  uint8_t data[image_size];" >> $@
        @echo "};" >> $@
        @echo "extern \"C\" const MainTargetImage main_target_image = {" >> $@
        @echo "  image_size, \"offload_target_main\"," >> $@
index 6f7eec91e6c87cb69d1482f941f15f25a836a102..19a1a96cfdbda7a04f8835bc644afb92e7371916 100644 (file)
@@ -715,7 +715,7 @@ main_target_image.h: offload_target_main
        @echo "struct MainTargetImage {" >> $@
        @echo "  int64_t size;" >> $@
        @echo "  char name[sizeof \"offload_target_main\"];" >> $@
-       @echo "  char data[image_size];" >> $@
+       @echo "  uint8_t data[image_size];" >> $@
        @echo "};" >> $@
        @echo "extern \"C\" const MainTargetImage main_target_image = {" >> $@
        @echo "  image_size, \"offload_target_main\"," >> $@
This page took 0.062986 seconds and 5 git commands to generate.