From bb9276646eb0137d984474b27f72275b9df765fc Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 8 Jul 2015 17:47:59 +0200 Subject: [PATCH] liboffloadmic plugin: Address -Wnarrowing diagnostics 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 | 6 ++++++ liboffloadmic/plugin/Makefile.am | 2 +- liboffloadmic/plugin/Makefile.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/liboffloadmic/ChangeLog b/liboffloadmic/ChangeLog index 01fb9f44187..b0f9e90187f 100644 --- a/liboffloadmic/ChangeLog +++ b/liboffloadmic/ChangeLog @@ -1,3 +1,9 @@ +2015-07-08 Thomas Schwinge + + * 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 * Makefile.in: Regenerated with automake-1.11.6. diff --git a/liboffloadmic/plugin/Makefile.am b/liboffloadmic/plugin/Makefile.am index a814f0cb451..19d69ab1044 100644 --- a/liboffloadmic/plugin/Makefile.am +++ b/liboffloadmic/plugin/Makefile.am @@ -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\"," >> $@ diff --git a/liboffloadmic/plugin/Makefile.in b/liboffloadmic/plugin/Makefile.in index 6f7eec91e6c..19a1a96cfdb 100644 --- a/liboffloadmic/plugin/Makefile.in +++ b/liboffloadmic/plugin/Makefile.in @@ -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\"," >> $@ -- 2.30.2