From 7cc1bdd06e68ab81612e8feee2a1dedf0e392886 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Sat, 13 Sep 2025 17:40:42 +0300 Subject: fix: Replace C-style casts with C++ static/reinterpret casts C-style casts should be replaced with appropriate C++ cast operators for better type safety and code clarity. This change fixes cppcheck style warnings about C-style pointer casting by using: - static_cast for simple pointer type conversions - reinterpret_cast for memory buffer pointer arithmetic The changes maintain identical functionality while following modern C++ best practices for explicit casting. --- kms++/src/omap/omapframebuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kms++/src/omap') diff --git a/kms++/src/omap/omapframebuffer.cpp b/kms++/src/omap/omapframebuffer.cpp index 9f9d7c7..4a94202 100644 --- a/kms++/src/omap/omapframebuffer.cpp +++ b/kms++/src/omap/omapframebuffer.cpp @@ -167,7 +167,7 @@ uint8_t* OmapFramebuffer::map(unsigned plane) if (p.map) return p.map; - p.map = (uint8_t*)omap_bo_map(p.omap_bo); + p.map = static_cast(omap_bo_map(p.omap_bo)); if (p.map == MAP_FAILED) throw invalid_argument(string("mmap failed: ") + strerror(errno)); -- cgit v1.2.3