File luvcview-fixwarn.diff of Package luvcview

Index: luvcview/gui.c
===================================================================
--- luvcview.orig/gui.c
+++ luvcview/gui.c
@@ -102,11 +102,13 @@ int creatButt(int width, int height)
     return 0;
   err:
     exit(0);
 }
+
 int destroyButt(void)
 {
     free(YUYVbutt);
     YUYVbutt = NULL;
     free(YUYVbuttOrg);
     YUYVbuttOrg = NULL;
+    return 0;
 }
Index: luvcview/luvcview.c
===================================================================
--- luvcview.orig/luvcview.c
+++ luvcview/luvcview.c
@@ -19,9 +19,9 @@
 # along with this program; if not, write to the Free Software                  #
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    #
 #                                                                              #
 *******************************************************************************/
-
+#define _GNU_SOURCE 1
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -553,8 +553,9 @@ int main(int argc, char *argv[])
 	destroyButt();
 	freeLut();
 	printf("Cleanup done. Exiting ...\n");
 	SDL_Quit();
+	return 0;
 }
 
 action_gui
 GUI_whichbutton(int x, int y, SDL_Surface * pscreen, struct vdIn *videoIn)
@@ -901,5 +902,6 @@ static int eventThread(void *data)
 	if (videoIn->rawFrameCapture == 2) {
 		printf("Stopped raw frame stream capturing. %u bytes written for %u frames.\n",
 				videoIn->rfsBytesWritten, videoIn->rfsFramesWritten);
 	}
+	return 0;
 }
Index: luvcview/v4l2uvc.c
===================================================================
--- luvcview.orig/v4l2uvc.c
+++ luvcview/v4l2uvc.c
@@ -27,8 +27,10 @@
 
 #include "v4l2uvc.h"
 #include "utils.h"
 
+#include <SDL/SDL_timer.h>
+
 #define ARRAY_SIZE(a)		(sizeof(a) / sizeof((a)[0]))
 #define FOURCC_FORMAT		"%c%c%c%c"
 #define FOURCC_ARGS(c)		(c) & 0xFF, ((c) >> 8) & 0xFF, ((c) >> 16) & 0xFF, ((c) >> 24) & 0xFF
 	
@@ -314,8 +316,9 @@ int save_controls(int vd)
     fflush(configfile);
     fclose(configfile);
     SDL_Delay(100);
   }
+  return 0;
 }
 
 
 int load_controls(int vd) //struct vdIn *vd)
@@ -341,8 +344,9 @@ int load_controls(int vd) //struct vdIn
         SDL_Delay(20);
       }   
     fclose(configfile);
   }
+  return 0;
 }
 
 static int init_v4l2(struct vdIn *vd)
 {
@@ -708,8 +712,9 @@ int close_v4l2(struct vdIn *vd)
     free(vd->pictName);
     vd->videodevice = NULL;
     vd->status = NULL;
     vd->pictName = NULL;
+    return 0;
 }
 
 /* return >= 0 ok otherwhise -1 */
 static int isv4l2Control(struct vdIn *vd, int control,
Index: luvcview/v4l2uvc.h
===================================================================
--- luvcview.orig/v4l2uvc.h
+++ luvcview/v4l2uvc.h
@@ -96,12 +96,16 @@ int v4l2UpControl(struct vdIn *vd, int c
 int v4l2DownControl(struct vdIn *vd, int control);
 int v4l2ToggleControl(struct vdIn *vd, int control);
 int v4l2ResetControl(struct vdIn *vd, int control);
 int v4l2ResetPanTilt(struct vdIn *vd);
+int v4l2ResetPan(struct vdIn *vd);
+int v4l2ResetTilt(struct vdIn *vd);
 int v4L2UpDownPan(struct vdIn *vd, short inc);
 int v4L2UpDownTilt(struct vdIn *vd,short inc);
 int v4L2UpDownPanTilt(struct vdIn *vd, short inc_p, short inc_t);
 int v4l2SetLightFrequencyFilter(struct vdIn *vd,int flt);
 int enum_frame_intervals(int dev, __u32 pixfmt, __u32 width, __u32 height);
 int enum_frame_sizes(int dev, __u32 pixfmt);
 int enum_frame_formats(int dev, unsigned int *supported_formats, unsigned int max_formats);
 
+int check_videoIn(struct vdIn *vd, char *device);
+