-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
linux: Fix compiler warnings about zero-length arrays in inline bitops #13465
linux: Fix compiler warnings about zero-length arrays in inline bitops #13465
Conversation
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Signed-off-by: Coleman Kane <ckane@colemankane.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I noticed there are a few more places in config/kernel-blk-queue.m4
, specifically in ZFS_AC_KERNEL_SRC_BLK_QUEUE_MAX_HW_SECTORS
and ZFS_AC_KERNEL_SRC_BLK_QUEUE_FLUSH
which would probably benefit from this same change. Even though it seems they're not currently causing any problems.
Thanks, I noticed that too but chose to minimize changes to the cases that seemed to specifically be causing the problem, largely due to a lack of available time to chase all of the other potential ones down. Definitely could be worth a more comprehensive effort, though. |
Also build tested on 5.18-rc7 |
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes #13463 Closes #13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When -Werror=array-bounds is used, this causes a build failure. Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#13463 Closes openzfs#13465
Motivation and Context
The compiler appears to be expanding the unused NULL pointer into a zero-length array via the inline bitops code. When
-Werror=array-bounds
is used, this causes a build failure.Fixes #13463
Description
Recommended solution is allocate temporary structures, fill with zeros (to avoid uninitialized data use warnings), and pass the pointer to those to the inline calls.
How Has This Been Tested?
So far, just build-testing
Types of changes
Checklist:
Signed-off-by
.