Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video_v4l2.c:1313:38: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument #1834

Open
PeterHolik opened this issue Dec 15, 2024 · 0 comments
Labels

Comments

@PeterHolik
Copy link

Did you read the guide?

Yes

What is the base version number of Motion being used?

4.7.x

What was the install method?

Built from source code

What is base architecture?

x86

What is the distro being used?

Ubuntu

Disto version number

24.10

Camera type(s) being used?

v4l2 USB camera, Network camera with RTSP

Describe the issue/problem and steps to reproduce

configured with --developer-flags i get

video_v4l2.c:1313:38: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument

video_v4l2.c.PATCH

Motion log output at log_level 8

video_v4l2.c: In function ‘v4l2_device_init’:
video_v4l2.c:1313:38: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
 1313 |     if (!(vid_source = calloc(sizeof(src_v4l2_t), 1))) {
      |                                      ^~~~~~~~~~
video_v4l2.c:1313:38: note: earlier argument should specify number of elements, later size of each element
video_v4l2.c: In function ‘v4l2_palette_valid’:
video_v4l2.c:1848:36: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
 1848 |         vid_source = calloc(sizeof(src_v4l2_t), 1);
      |                                    ^~~~~~~~~~
video_v4l2.c:1848:36: note: earlier argument should specify number of elements, later size of each element
video_v4l2.c: In function ‘v4l2_parms_valid’:
video_v4l2.c:1937:36: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
 1937 |         vid_source = calloc(sizeof(src_v4l2_t), 1);
      |                                    ^~~~~~~~~~
video_v4l2.c:1937:36: note: earlier argument should specify number of elements, later size of each element
@PeterHolik PeterHolik added the bug label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant