0021-cmake-Disable-format-overflow-warning-as-error.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From ee842886f3c0589d6df5a0687973beb18a3be524 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Tue, 31 Mar 2020 11:51:02 -0700
  4. Subject: [PATCH 21/21] cmake: Disable format-overflow warning as error
  5. gcc10 complains about a check which could potentially be null
  6. build/inc/interface/vcos/vcos_logging.h:234:88: error: '%s' directive argument is null [-Werror=format-overflow=]
  7. 234 | # define _VCOS_LOG_X(cat, _level, fmt...) do { if (vcos_is_log_enabled(cat,_level)) vcos_log_impl(cat,_level,fmt); } while (0)
  8. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  9. A potential fix would be to check for fmt not being null but lets leave
  10. that to experts
  11. Upstream-Status: Pending
  12. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  13. ---
  14. host_applications/linux/libs/bcm_host/CMakeLists.txt | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt
  17. index a863cb6..f358135 100644
  18. --- a/host_applications/linux/libs/bcm_host/CMakeLists.txt
  19. +++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt
  20. @@ -3,7 +3,7 @@ if (WIN32)
  21. set(VCOS_PLATFORM win32)
  22. else ()
  23. set(VCOS_PLATFORM pthreads)
  24. - add_definitions(-Wall -Werror)
  25. + add_definitions(-Wall -Werror -Wno-error=format-overflow)
  26. endif ()
  27. # set this as we want all the source of vchostif to be available in libbcm_host
  28. --
  29. 2.27.0