aboutsummaryrefslogtreecommitdiffstats
path: root/utils/qvidcap
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-08-27 14:16:23 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2018-08-27 14:16:23 +0200
commite37fbf50a28c1a1cfe9e00a60542bc14192a87ba (patch)
tree2f2777af40373c5922d434c82d750fa3483782d9 /utils/qvidcap
parent015ca7524748fa7cef296102c68b631b078b63c6 (diff)
qvidcap: fix 32-bit compiler warning
capture-win-gl.cpp: In member function ‘void CaptureGLWin::checkError(const char*)’: capture-win-gl.cpp:690:79: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t {aka unsigned int}’ [-Wformat=] fprintf(stderr, "OpenGL Error (no: %lu) code 0x%x: %s.\n", errNo++, err, msg); ^ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/qvidcap')
-rw-r--r--utils/qvidcap/capture-win-gl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/qvidcap/capture-win-gl.cpp b/utils/qvidcap/capture-win-gl.cpp
index 4ef7d276..22627263 100644
--- a/utils/qvidcap/capture-win-gl.cpp
+++ b/utils/qvidcap/capture-win-gl.cpp
@@ -685,9 +685,10 @@ bool CaptureGLWin::supportedFmt(__u32 fmt)
void CaptureGLWin::checkError(const char *msg)
{
int err;
- size_t errNo = 0;
+ unsigned errNo = 0;
+
while ((err = glGetError()) != GL_NO_ERROR)
- fprintf(stderr, "OpenGL Error (no: %lu) code 0x%x: %s.\n", errNo++, err, msg);
+ fprintf(stderr, "OpenGL Error (no: %u) code 0x%x: %s.\n", errNo++, err, msg);
if (errNo)
exit(errNo);

Privacy Policy