diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-12-01 09:14:19 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-12-01 09:14:34 +0200 |
commit | 6fa8696774c4bda4bb7e3efabd7e1e58a899f5c1 (patch) | |
tree | 33325ca8d790849ac8bd3e0847320bba38d8328b /utils | |
parent | 0d6e3a43c2719263b907e8e03ac9ab35fc765013 (diff) |
Fix clang-tidy reported issues
Diffstat (limited to 'utils')
-rw-r--r-- | utils/kmstest.cpp | 3 | ||||
-rw-r--r-- | utils/kmstouch.cpp | 2 | ||||
-rw-r--r-- | utils/kmsview.cpp | 3 |
3 files changed, 8 insertions, 0 deletions
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<OutputInfo>& 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<OutputInfo>& 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 <cstdio> #include <fstream> #include <unistd.h> +#include <cassert> #include <kms++/kms++.h> #include <kms++util/kms++util.h> @@ -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); |