From 6fa8696774c4bda4bb7e3efabd7e1e58a899f5c1 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 1 Dec 2020 09:14:19 +0200 Subject: Fix clang-tidy reported issues --- utils/kmstest.cpp | 3 +++ utils/kmstouch.cpp | 2 ++ utils/kmsview.cpp | 3 +++ 3 files changed, 8 insertions(+) (limited to 'utils') diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp index 981a2fd..3f1716f 100644 --- a/utils/kmstest.cpp +++ b/utils/kmstest.cpp @@ -1055,6 +1055,8 @@ private: static void main_flip(Card& card, const vector& outputs) { +// clang-tidy does not seem to handle FD_xxx macros +#ifndef __clang_analyzer__ fd_set fds; FD_ZERO(&fds); @@ -1101,6 +1103,7 @@ static void main_flip(Card& card, const vector& outputs) card.call_page_flip_handlers(); } } +#endif } int main(int argc, char** argv) diff --git a/utils/kmstouch.cpp b/utils/kmstouch.cpp index fbe0f3d..8afcee5 100644 --- a/utils/kmstouch.cpp +++ b/utils/kmstouch.cpp @@ -288,4 +288,6 @@ int main(int argc, char** argv) handle_event(ev, fb); } while (rc == 1 || rc == 0 || rc == -EAGAIN); + + delete fb; } diff --git a/utils/kmsview.cpp b/utils/kmsview.cpp index 952c643..c2654b0 100644 --- a/utils/kmsview.cpp +++ b/utils/kmsview.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -92,6 +93,8 @@ int main(int argc, char** argv) for (unsigned i = 0; i < fb->num_planes(); ++i) frame_size += fb->size(i); + assert(frame_size); + unsigned num_frames = fsize / frame_size; printf("file size %u, frame size %u, frames %u\n", fsize, frame_size, num_frames); -- cgit v1.2.3