summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/kmstest.cpp3
-rw-r--r--utils/kmstouch.cpp2
-rw-r--r--utils/kmsview.cpp3
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);