From 4a24a4d02c0013543d33fe0b2ddbf6b44dfc9a1b Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 31 Dec 2010 16:18:03 +0100 Subject: [PATCH] cx18-ctl: fix compile warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit cx18-ctl.c: In function ‘main’: cx18-ctl.c:262: warning: unused variable ‘ptsstr’ cx18-ctl.c:261: warning: unused variable ‘timestamp’ cx18-ctl.c:254: warning: unused variable ‘yuv_mode’ cx18-ctl.c: At top level: cx18-ctl.c:125: warning: ‘pts_to_string’ defined but not used Signed-off-by: Hans Verkuil --- utils/v4l2-ctl/cx18-ctl.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/utils/v4l2-ctl/cx18-ctl.c b/utils/v4l2-ctl/cx18-ctl.c index b072771..09c255c 100644 --- a/utils/v4l2-ctl/cx18-ctl.c +++ b/utils/v4l2-ctl/cx18-ctl.c @@ -122,29 +122,6 @@ static void usage(void) exit(0); } -static char *pts_to_string(char *str, unsigned long pts, float fps) -{ - static char buf[256]; - int hours, minutes, seconds, fracsec; - int frame; - char *p = (str) ? str : buf; - - static const int MPEG_CLOCK_FREQ = 90000; - seconds = pts / MPEG_CLOCK_FREQ; - fracsec = pts % MPEG_CLOCK_FREQ; - - minutes = seconds / 60; - seconds = seconds % 60; - - hours = minutes / 60; - minutes = minutes % 60; - - frame = (int)ceilf(((float)fracsec / (float)MPEG_CLOCK_FREQ) * fps); - - snprintf(p, sizeof(buf), "%d:%02d:%02d:%d", hours, minutes, seconds, frame); - return p; -} - static void print_debug_mask(int mask) { #define MASK_OR_NOTHING (mask ? " | " : "") @@ -251,15 +228,12 @@ int main(int argc, char **argv) /* command args */ const char *device = "/dev/video0"; /* -d device */ int ch; - int yuv_mode = 0; unsigned int gpio_out = 0x0; /* GPIO output data */ unsigned int gpio_dir = 0x0; /* GPIO direction bits */ int gpio_set_dir = 0; int debug_level = 0; __u32 reset = 0; int new_debug_level, gdebug_level; - double timestamp; - char ptsstr[64]; char short_options[26 * 2 * 2 + 1]; if (argc == 1) { -- 2.7.4