0001-cmake-remove-Werror-and-Wfatal-errors-compiler-comma.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 6bd733b52f0b4039407c676cd3126a9e2f79456b Mon Sep 17 00:00:00 2001
  2. From: Peter Seiderer <ps.report@gmx.net>
  3. Date: Fri, 5 Feb 2021 18:24:08 +0100
  4. Subject: [PATCH] cmake: remove -Werror and -Wfatal-errors compiler command
  5. line option
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. Fixes (with bootlin-riscv64-musl toolchain):
  10. .../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/core/libcamera_app.cpp:30:22: error: overflow in conversion from ‘long unsigned int’ to ‘int’ changes value from ‘2154321408’ to ‘-2140645888’ [-Werror=overflow]
  11. 30 | int ret = ioctl(fd, VIDIOC_QUERYCAP, &caps);
  12. | ^~~~~~~~~~~~~~~
  13. cc1plus: all warnings being treated as errors
  14. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  15. ---
  16. CMakeLists.txt | 2 +-
  17. 1 file changed, 1 insertion(+), 1 deletion(-)
  18. diff --git a/CMakeLists.txt b/CMakeLists.txt
  19. index 748c6dd..1ca1e39 100644
  20. --- a/CMakeLists.txt
  21. +++ b/CMakeLists.txt
  22. @@ -11,7 +11,7 @@ endif()
  23. set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
  24. set (CMAKE_CXX_STANDARD 17)
  25. -add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new -Werror -Wfatal-errors)
  26. +add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new)
  27. add_definitions(-D_FILE_OFFSET_BITS=64)
  28. if (CMAKE_COMPILER_IS_GNUCXX)
  29. --
  30. 2.34.1