diff options
| author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2022-12-04 20:45:57 +0200 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2022-12-04 20:46:20 +0200 |
| commit | 74ff7361c38c4f8620b68c72fd2263c1f2d6a5a2 (patch) | |
| tree | 990417471280c515f85062a75b97c31ac4db6e57 | |
| parent | f22939013aa53b6584503285e32237f52490f3e2 (diff) | |
Fix clang-tidy warnings
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
| -rw-r--r-- | kms++/inc/kms++/blob.h | 1 | ||||
| -rw-r--r-- | kms++/inc/kms++/drmobject.h | 1 | ||||
| -rw-r--r-- | kms++/inc/kms++/pagefliphandler.h | 2 | ||||
| -rw-r--r-- | kms++/inc/kms++/pixelformats.h | 4 | ||||
| -rw-r--r-- | kms++/inc/kms++/plane.h | 2 | ||||
| -rw-r--r-- | kms++/inc/kms++/property.h | 1 | ||||
| -rw-r--r-- | kms++util/src/font_8x8.h | 3 | ||||
| -rw-r--r-- | kmscube/cube-egl.cpp | 1 | ||||
| -rw-r--r-- | v4l2++/inc/v4l2++/pixelformats.h | 4 |
9 files changed, 14 insertions, 5 deletions
diff --git a/kms++/inc/kms++/blob.h b/kms++/inc/kms++/blob.h index 011613d..386e9d5 100644 --- a/kms++/inc/kms++/blob.h +++ b/kms++/inc/kms++/blob.h @@ -2,6 +2,7 @@ #include "drmobject.h" #include <vector> +#include <stddef.h> namespace kms { diff --git a/kms++/inc/kms++/drmobject.h b/kms++/inc/kms++/drmobject.h index e15ed4c..587f122 100644 --- a/kms++/inc/kms++/drmobject.h +++ b/kms++/inc/kms++/drmobject.h @@ -1,5 +1,6 @@ #pragma once +#include <stdint.h> #include <map> #include "decls.h" diff --git a/kms++/inc/kms++/pagefliphandler.h b/kms++/inc/kms++/pagefliphandler.h index 2f5fdcd..e727375 100644 --- a/kms++/inc/kms++/pagefliphandler.h +++ b/kms++/inc/kms++/pagefliphandler.h @@ -1,5 +1,7 @@ #pragma once +#include <stdint.h> + namespace kms { class PageFlipHandlerBase diff --git a/kms++/inc/kms++/pixelformats.h b/kms++/inc/kms++/pixelformats.h index 6f2671b..8ebb76b 100644 --- a/kms++/inc/kms++/pixelformats.h +++ b/kms++/inc/kms++/pixelformats.h @@ -66,12 +66,12 @@ enum class PixelFormat : uint32_t { BGRA1010102 = MakeFourCC("BA30"), }; -static inline PixelFormat FourCCToPixelFormat(const std::string& fourcc) +inline PixelFormat FourCCToPixelFormat(const std::string& fourcc) { return (PixelFormat)MakeFourCC(fourcc.c_str()); } -static inline std::string PixelFormatToFourCC(PixelFormat f) +inline std::string PixelFormatToFourCC(PixelFormat f) { char buf[5] = { (char)(((uint32_t)f >> 0) & 0xff), (char)(((uint32_t)f >> 8) & 0xff), diff --git a/kms++/inc/kms++/plane.h b/kms++/inc/kms++/plane.h index d3cfde5..f6d0ca6 100644 --- a/kms++/inc/kms++/plane.h +++ b/kms++/inc/kms++/plane.h @@ -1,6 +1,8 @@ #pragma once #include "drmpropobject.h" +#include "pixelformats.h" +#include <vector> namespace kms { diff --git a/kms++/inc/kms++/property.h b/kms++/inc/kms++/property.h index 7c7b834..e080962 100644 --- a/kms++/inc/kms++/property.h +++ b/kms++/inc/kms++/property.h @@ -2,6 +2,7 @@ #include "drmobject.h" #include <map> +#include <string> #include <vector> namespace kms diff --git a/kms++util/src/font_8x8.h b/kms++util/src/font_8x8.h index ed9bf3f..ea01ecb 100644 --- a/kms++util/src/font_8x8.h +++ b/kms++util/src/font_8x8.h @@ -4,6 +4,8 @@ /* */ /**********************************************/ +#include <stdint.h> + const uint8_t fontdata_8x8[] = { /* 0 0x00 '^@' */ @@ -2565,5 +2567,4 @@ const uint8_t fontdata_8x8[] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ - }; diff --git a/kmscube/cube-egl.cpp b/kmscube/cube-egl.cpp index 5f23c4e..9551793 100644 --- a/kmscube/cube-egl.cpp +++ b/kmscube/cube-egl.cpp @@ -67,6 +67,7 @@ EglState::EglState(void* native_display) EGLConfig configs[numConfigs]; b = eglGetConfigs(m_display, configs, numConfigs, &numConfigs); + FAIL_IF(!b, "failed to get configs"); printf("Available configs:\n"); diff --git a/v4l2++/inc/v4l2++/pixelformats.h b/v4l2++/inc/v4l2++/pixelformats.h index c7eda25..777d0ec 100644 --- a/v4l2++/inc/v4l2++/pixelformats.h +++ b/v4l2++/inc/v4l2++/pixelformats.h @@ -73,14 +73,14 @@ enum class PixelFormat : uint32_t { META_16 = MakeFourCC("ME16"), }; -static inline PixelFormat FourCCToPixelFormat(const std::string& fourcc) +inline PixelFormat FourCCToPixelFormat(const std::string& fourcc) { return (PixelFormat)MakeFourCC(fourcc.c_str()); } PixelFormat DRMFourCCToPixelFormat(const std::string& fourcc); -static inline std::string PixelFormatToFourCC(PixelFormat f) +inline std::string PixelFormatToFourCC(PixelFormat f) { char buf[5] = { (char)(((uint32_t)f >> 0) & 0xff), (char)(((uint32_t)f >> 8) & 0xff), |
