diff mbox series

[git:v4l-utils/master] v4l2-tracer: use __s64 instead of long

Message ID 98e7a971-4a46-8780-1bf0-eb87752af9f2@xs4all.nl
State New
Headers show
Series [git:v4l-utils/master] v4l2-tracer: use __s64 instead of long | expand

Commit Message

Hans Verkuil Feb. 24, 2023, 2:52 p.m. UTC
Hi Gregor,

This one should probably go to a 1.24.1 stable release.

Sorry about that, we didn't try to build on a 32 bit system.

The good news is: people ARE using this, since it was reported within a day.

Regards,

	Hans

-------- Forwarded Message --------
Subject: [git:v4l-utils/master] v4l2-tracer: use __s64 instead of long
Date: Fri, 24 Feb 2023 14:49:00 +0000
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reply-To: linux-media@vger.kernel.org
To: linuxtv-commits@linuxtv.org

This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: v4l2-tracer: use __s64 instead of long
Author:  Hans Verkuil <hverkuil-cisco@xs4all.nl>
Date:    Fri Feb 24 15:42:59 2023 +0100

This fixes compiler errors when building on the 32 bit architecture.

They are all of this type:

../../include/linux/videodev2.h:2583:33: error: narrowing conversion of 3222820424 from unsigned int to long int [-Wnarrowing]
 2583 | #define VIDIOC_S_EXT_CTRLS      _IOWR('V', 72, struct v4l2_ext_controls)
      |                                 ^~~~~
v4l2-tracer-info-gen.h:2069:11: note: in expansion of macro VIDIOC_S_EXT_CTRLS
 2069 |         { VIDIOC_S_EXT_CTRLS,   "VIDIOC_S_EXT_CTRLS" },
      |           ^~~~~~~~~~~~~~~~~~

and:

../../include/linux/videodev2.h:2583:33: error: narrowing conversion of 3222820424 from unsigned int to long int [-Wnarrowing]
 2583 | #define VIDIOC_S_EXT_CTRLS      _IOWR('V', 72, struct v4l2_ext_controls)
      |                                 ^~~~~
retrace.cpp:1273:14: note: in expansion of macro VIDIOC_S_EXT_CTRLS
 1273 |         case VIDIOC_S_EXT_CTRLS:
      |              ^~~~~~~~~~~~~~~~~~

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

 utils/v4l2-tracer/retrace.cpp          | 2 +-
 utils/v4l2-tracer/v4l2-tracer-common.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=5ab5a0ee52d0b96f1750d32e4ed63e2f43d71439
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
diff mbox series

Patch

diff --git a/utils/v4l2-tracer/retrace.cpp b/utils/v4l2-tracer/retrace.cpp
index 29ac4a38298a..8667826c0488 100644
--- a/utils/v4l2-tracer/retrace.cpp
+++ b/utils/v4l2-tracer/retrace.cpp
@@ -1166,7 +1166,7 @@  void retrace_media_ioc_request_alloc(int fd_retrace, json_object *ioctl_args)
  void retrace_ioctl(json_object *syscall_obj)
 {
-	long cmd = 0;
+	__s64 cmd = 0;
 	int fd_retrace = 0;
  	json_object *fd_trace_obj;
diff --git a/utils/v4l2-tracer/v4l2-tracer-common.h b/utils/v4l2-tracer/v4l2-tracer-common.h
index 0bdb125d2135..a8ca68bb21af 100644
--- a/utils/v4l2-tracer/v4l2-tracer-common.h
+++ b/utils/v4l2-tracer/v4l2-tracer-common.h
@@ -41,7 +41,7 @@ 
 #endif
  struct val_def {
-	long val;
+	__s64 val;
 	const char *str;
 };

_______________________________________________