intel / intel-vaapi-driver

VA-API user mode driver for Intel GEN Graphics family
https://01.org/linuxmedia
Other
303 stars 126 forks source link

Fix compilation warnings. #460

Closed ceyusa closed 5 years ago

ceyusa commented 5 years ago

In commit f6573cb7 memmem() call is introduced which is a GNU extension, which need to be enabled explicitely, otherwise the compiler will trigger a warning.

This patch enables globally the usage of GNU extensions.

ceyusa commented 5 years ago

May I see the CI compilation errors?

uartie commented 5 years ago
13:09:10,757 INFO  - Making all in test
13:09:10,760 INFO  - make[1]: Entering directory '/opt/media/build/intel-vaapi-driver/test'
13:09:10,762 INFO  - g++ -DHAVE_CONFIG_H -I. -I../src -I../src -I/usr/include/libdrm -I/opt/media/install/include -I/opt/media/install/include -DGTEST_HAS_PTHREAD=1 -DGTEST_USE_OWN_TR1_TUPLE=0 -DGTEST_LANG_CXX11=1 -DGTEST_HAS_TR1_TUPLE=1 -DPTHREADS -DVA_DRIVERS_PATH="\"/opt/media/install/lib/dri\"" -DTEST_VA_DRIVERS_PATH="\"/opt/media/build/intel-vaapi-driver/src/.libs\"" -std=c++11 -I/opt/media/install/include -Wall -Werror -I../test/gtest/include -g3 -MT test_i965_drv_video-i965_avcd_config_test.o -MD -MP -MF .deps/test_i965_drv_video-i965_avcd_config_test.Tpo -c -o test_i965_drv_video-i965_avcd_config_test.o `test -f 'i965_avcd_config_test.cpp' || echo './'`i965_avcd_config_test.cpp
13:09:10,763 INFO  - g++ -DHAVE_CONFIG_H -I. -I../src -I../src -I/usr/include/libdrm -I/opt/media/install/include -I/opt/media/install/include -DGTEST_HAS_PTHREAD=1 -DGTEST_USE_OWN_TR1_TUPLE=0 -DGTEST_LANG_CXX11=1 -DGTEST_HAS_TR1_TUPLE=1 -DPTHREADS -DVA_DRIVERS_PATH="\"/opt/media/install/lib/dri\"" -DTEST_VA_DRIVERS_PATH="\"/opt/media/build/intel-vaapi-driver/src/.libs\"" -std=c++11 -I/opt/media/install/include -Wall -Werror -I../test/gtest/include -g3 -MT test_i965_drv_video-i965_avce_config_test.o -MD -MP -MF .deps/test_i965_drv_video-i965_avce_config_test.Tpo -c -o test_i965_drv_video-i965_avce_config_test.o `test -f 'i965_avce_config_test.cpp' || echo './'`i965_avce_config_test.cpp
13:09:10,766 INFO  - g++ -DHAVE_CONFIG_H -I. -I../src -I../src -I/usr/include/libdrm -I/opt/media/install/include -I/opt/media/install/include -DGTEST_HAS_PTHREAD=1 -DGTEST_USE_OWN_TR1_TUPLE=0 -DGTEST_LANG_CXX11=1 -DGTEST_HAS_TR1_TUPLE=1 -DPTHREADS -DVA_DRIVERS_PATH="\"/opt/media/install/lib/dri\"" -DTEST_VA_DRIVERS_PATH="\"/opt/media/build/intel-vaapi-driver/src/.libs\"" -std=c++11 -I/opt/media/install/include -Wall -Werror -I../test/gtest/include -g3 -MT test_i965_drv_video-i965_avce_context_test.o -MD -MP -MF .deps/test_i965_drv_video-i965_avce_context_test.Tpo -c -o test_i965_drv_video-i965_avce_context_test.o `test -f 'i965_avce_context_test.cpp' || echo './'`i965_avce_context_test.cpp
13:09:10,767 INFO  - g++ -DHAVE_CONFIG_H -I. -I../src -I../src -I/usr/include/libdrm -I/opt/media/install/include -I/opt/media/install/include -DGTEST_HAS_PTHREAD=1 -DGTEST_USE_OWN_TR1_TUPLE=0 -DGTEST_LANG_CXX11=1 -DGTEST_HAS_TR1_TUPLE=1 -DPTHREADS -DVA_DRIVERS_PATH="\"/opt/media/install/lib/dri\"" -DTEST_VA_DRIVERS_PATH="\"/opt/media/build/intel-vaapi-driver/src/.libs\"" -std=c++11 -I/opt/media/install/include -Wall -Werror -I../test/gtest/include -g3 -MT test_i965_drv_video-i965_avce_test_common.o -MD -MP -MF .deps/test_i965_drv_video-i965_avce_test_common.Tpo -c -o test_i965_drv_video-i965_avce_test_common.o `test -f 'i965_avce_test_common.cpp' || echo './'`i965_avce_test_common.cpp
13:09:10,935 INFO  - In file included from i965_internal_decl.h:29:0,
13:09:10,935 INFO  - from i965_test_environment.h:29,
13:09:10,935 INFO  - from i965_test_fixture.h:28,
13:09:10,935 INFO  - from i965_config_test.h:28,
13:09:10,935 INFO  - from i965_avcd_config_test.cpp:25:
13:09:10,935 INFO  - ../src/sysdeps.h:40:0: error: "_GNU_SOURCE" redefined [-Werror]
13:09:10,935 INFO  - #define _GNU_SOURCE
13:09:10,935 INFO  -
13:09:10,935 INFO  - In file included from i965_internal_decl.h:29:0,
13:09:10,935 INFO  - from i965_test_environment.h:29,
13:09:10,935 INFO  - from i965_test_fixture.h:28,
13:09:10,935 INFO  - from i965_config_test.h:28,
13:09:10,935 INFO  - from i965_avce_config_test.cpp:25:
13:09:10,935 INFO  - ../src/sysdeps.h:40:0: error: "_GNU_SOURCE" redefined [-Werror]
13:09:10,935 INFO  - #define _GNU_SOURCE
13:09:10,935 INFO  -
13:09:10,935 INFO  - <command-line>:0:0: note: this is the location of the previous definition
13:09:10,936 INFO  - <command-line>:0:0: note: this is the location of the previous definition
13:09:10,945 INFO  - In file included from i965_internal_decl.h:29:0,
13:09:10,945 INFO  - from i965_test_environment.h:29,
13:09:10,945 INFO  - from i965_avce_test_common.cpp:26:
13:09:10,945 INFO  - ../src/sysdeps.h:40:0: error: "_GNU_SOURCE" redefined [-Werror]
13:09:10,945 INFO  - #define _GNU_SOURCE
13:09:10,945 INFO  -
13:09:10,945 INFO  - <command-line>:0:0: note: this is the location of the previous definition
13:09:10,996 INFO  - In file included from i965_internal_decl.h:29:0,
13:09:10,996 INFO  - from i965_test_environment.h:29,
13:09:10,996 INFO  - from i965_test_fixture.h:28,
13:09:10,997 INFO  - from i965_avce_context_test.cpp:27:
13:09:10,997 INFO  - ../src/sysdeps.h:40:0: error: "_GNU_SOURCE" redefined [-Werror]
13:09:10,997 INFO  - #define _GNU_SOURCE
13:09:10,997 INFO  -
13:09:10,997 INFO  - <command-line>:0:0: note: this is the location of the previous definition
13:09:11,606 INFO  - cc1plus: all warnings being treated as errors
13:09:11,615 INFO  - Makefile:642: recipe for target 'test_i965_drv_video-i965_avce_test_common.o' failed
13:09:11,615 INFO  - make[1]: *** [test_i965_drv_video-i965_avce_test_common.o] Error 1
13:09:11,615 INFO  - make[1]: *** Waiting for unfinished jobs....
13:09:12,026 INFO  - cc1plus: all warnings being treated as errors
13:09:12,039 INFO  - Makefile:614: recipe for target 'test_i965_drv_video-i965_avce_config_test.o' failed
13:09:12,039 INFO  - make[1]: *** [test_i965_drv_video-i965_avce_config_test.o] Error 1
13:09:12,107 INFO  - cc1plus: all warnings being treated as errors
13:09:12,119 INFO  - Makefile:600: recipe for target 'test_i965_drv_video-i965_avcd_config_test.o' failed
13:09:12,119 INFO  - make[1]: *** [test_i965_drv_video-i965_avcd_config_test.o] Error 1
13:09:12,665 INFO  - cc1plus: all warnings being treated as errors
13:09:12,681 INFO  - Makefile:628: recipe for target 'test_i965_drv_video-i965_avce_context_test.o' failed
13:09:12,681 INFO  - make[1]: *** [test_i965_drv_video-i965_avce_context_test.o] Error 1
13:09:12,681 INFO  - make[1]: Leaving directory '/opt/media/build/intel-vaapi-driver/test'
13:09:12,682 INFO  - Makefile:412: recipe for target 'all-recursive' failed
13:09:12,682 INFO  - make: *** [all-recursive] Error 1
13:09:12,682 INFO  - err: "make -j 4" failed - exitcode 2
13:09:12,682 INFO  - aborting...
uartie commented 5 years ago

--enable-drm --enable-x11 --enable-wayland --enable-tests

ceyusa commented 5 years ago

oh, the tests! ok...