From b67792f9f26daac5e94c7a97a37617c379a9a883 Mon Sep 17 00:00:00 2001 From: cnhenry Date: Thu, 13 Aug 2015 20:18:41 -0500 Subject: [PATCH] Clear warnings from device listing fix --- src/video_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/video_device.c b/src/video_device.c index b0c2a41..c490bc8 100644 --- a/src/video_device.c +++ b/src/video_device.c @@ -186,7 +186,7 @@ VideoDeviceError init_video_devices() /* Query V4L for capture capabilities */ if ( -1 != ioctl(fd, VIDIOC_QUERYCAP, &cap) ) { - video_input_name = (char*)malloc(strlen(cap.card) + strlen(device_address) + 4); + video_input_name = (char*)malloc(strlen((const char*)cap.card) + strlen(device_address) + 4); strcpy(video_input_name, (char*)cap.card); strcat(video_input_name, " ("); strcat(video_input_name, (char*)device_address); @@ -234,8 +234,7 @@ VideoDeviceError terminate_video_devices() int i; for (i = 0; i < size[vdt_input]; ++i) { - const char* video_input_name = video_devices_names[vdt_input][i]; - free(video_input_name); + free((void*)video_devices_names[vdt_input][i]); } if ( pthread_mutex_destroy(&video_mutex) != 0 )