Project

General

Profile

Actions

Bug #14390

closed

av1394: build errors with gcc 11

Added by Toomas Soome 9 days ago. Updated 7 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors:

../../common/io/1394/targets/av1394/av1394_isoch.c: In function 'av1394_ioctl_isoch_handle2ic':
../../common/io/1394/targets/av1394/av1394_isoch.c:592:39: error: expression does not compute the number of elements in this array; element type is 'av1394_ic_t *' {aka 'struct av1394_ic_s *'}, not 'av1394_ic_t' {aka 'struct av1394_ic_s'} [-Werror=sizeof-array-div]
  592 |         if (num >= (sizeof (ip->i_ic) / sizeof (av1394_ic_t))) {
      |                                       ^
../../common/io/1394/targets/av1394/av1394_isoch.c:592:39: note: add parentheses around the second 'sizeof' to silence this warning
../../common/io/1394/targets/av1394/av1394_isoch.c: In function 'av1394_ioctl_recv':
../../common/io/1394/targets/av1394/av1394_isoch.c:668:39: error: expression does not compute the number of elements in this array; element type is 'av1394_ic_t *' {aka 'struct av1394_ic_s *'}, not 'av1394_ic_t' {aka 'struct av1394_ic_s'} [-Werror=sizeof-array-div]
  668 |         if (num >= (sizeof (ip->i_ic) / sizeof (av1394_ic_t))) {
      |                                       ^
../../common/io/1394/targets/av1394/av1394_isoch.c:668:39: note: add parentheses around the second 'sizeof' to silence this warning
../../common/io/1394/targets/av1394/av1394_isoch.c: In function 'av1394_ioctl_xmit':
../../common/io/1394/targets/av1394/av1394_isoch.c:710:39: error: expression does not compute the number of elements in this array; element type is 'av1394_ic_t *' {aka 'struct av1394_ic_s *'}, not 'av1394_ic_t' {aka 'struct av1394_ic_s'} [-Werror=sizeof-array-div]
  710 |         if (num >= (sizeof (ip->i_ic) / sizeof (av1394_ic_t))) {
      |                                       ^
../../common/io/1394/targets/av1394/av1394_isoch.c:710:39: note: add parentheses around the second 'sizeof' to silence this warning

Testing done: build/install/boot; but I have no hw...

Actions #1

Updated by Electric Monk 9 days ago

  • Gerrit CR set to 1938
Actions #2

Updated by Toomas Soome 7 days ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk 7 days ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit c12f119108dcac3bfe73ac01ce1bbc643a733ca2

commit  c12f119108dcac3bfe73ac01ce1bbc643a733ca2
Author: Toomas Soome <tsoome@me.com>
Date:   2022-01-11T22:19:58.000Z

    14390 av1394: build errors with gcc 11
    Reviewed by: Peter Tribble <peter.tribble@gmail.com>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF