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

SPL/ZFS compiler warnings on 32-bit systems #813

Closed
adilger opened this issue Jul 9, 2012 · 3 comments
Closed

SPL/ZFS compiler warnings on 32-bit systems #813

adilger opened this issue Jul 9, 2012 · 3 comments
Labels
Type: Architecture Indicates an issue is specific to a single processor architecture Type: Building Indicates an issue related to building binaries
Milestone

Comments

@adilger
Copy link
Contributor

adilger commented Jul 9, 2012

There are a number of compiler warnings on i686 that are in the build log:
http://build.whamcloud.com/job/lustre-reviews/7484/arch=i686,build_type=server,distro=el6,ib_stack=inkernel/consoleFull

spl-0.6.0/module/spl/spl-generic.c:490: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int'
warning: File listed twice: /etc/zfs/zdev.conf
warning: File listed twice: /lib/udev/rules.d
warning: File listed twice: /lib/udev/rules.d/60-vdev.rules
warning: File listed twice: /lib/udev/rules.d/60-zpool.rules
warning: File listed twice: /lib/udev/rules.d/60-zvol.rules
warning: File listed twice: /lib/udev/rules.d/90-zfs.rules
warning: File listed twice: /lib/udev/vdev_id
warning: File listed twice: /lib/udev/zpool_id
warning: File listed twice: /lib/udev/zvol_id
In function 'zfsctl_is_snapdir':
zfs-0.6.0//module/zfs/zfs_ctldir.c:151: warning: integer constant is too large for 'long' type
In function 'zfsctl_create':
zfs-0.6.0/module/zfs/zfs_ctldir.c:276: warning: integer constant is too large for 'long' type
In function 'zfsctl_root_lookup':
zfs-0.6.0/module/zfs/zfs_ctldir.c:401: warning: integer constant is too large for 'long' type
zfs-0.6.0/module/zfs/zfs_ctldir.c:402: warning: large integer implicitly truncated to unsigned type
zfs-0.6.0/module/zfs/zfs_ctldir.c:404: warning: integer constant is too large for 'long' type
zfs-0.6.0/module/zfs/zfs_ctldir.c:405: warning: large integer implicitly truncated to unsigned type
In function 'zfsctl_snapdir_lookup':
zfs-0.6.0/module/zfs/zfs_ctldir.c:440: warning: integer constant is too large for 'long' type
In function 'zpl_root_readdir':
zfs-0.6.0/module/zfs/zpl_ctldir.c:108: warning: integer constant is too large for 'long' type
zfs-0.6.0/module/zfs/zpl_ctldir.c:116: warning: integer constant is too large for 'long' type
In function 'zpl_snapdir_readdir':
zfs-0.6.0/module/zfs/zpl_ctldir.c:256: warning: integer constant is too large for 'long' type
@ryao
Copy link
Contributor

ryao commented Jul 9, 2012

Thanks for reporting this. This could explain some of the issues that people are having on 32-bit systems.

@behlendorf
Copy link
Contributor

I really should add an x86 builder to my build farm to catch these sorts of things. Yes, we'll need to run them down.

@ryao
Copy link
Contributor

ryao commented Jul 9, 2012

The issue here appears to be that some constants in ./include/sys/zfs_ctldir.h were changed from 0x1, 0x2 0x3... to 0x0000FFFFFFFFFFFF, 0x0000FFFFFFFFFFFE, 0x0000FFFFFFFFFFFD and the compiler does not like that. Using the ULL suffix should fix that. I will file a pull request with that change after testing it for regressions on amd64.

ryao added a commit to ryao/zfs that referenced this issue Jul 10, 2012
The lack of the ULL suffix causes warnings such as the following on
32-bit systems:

In function 'zfsctl_is_snapdir':
zfs-0.6.0//module/zfs/zfs_ctldir.c:151: warning: integer constant is too
large for 'long' type

We add the ULL suffix to fix that.

This closes issue openzfs#813.

Signed-off-by: Richard Yao <[email protected]>
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this issue Sep 26, 2023
…e6ff6c0-7ed5-4638-a3be-1ce12e50bab3

QA-40085  Reduce scope of zloop to include tests applicable to Delphix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Architecture Indicates an issue is specific to a single processor architecture Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

No branches or pull requests

3 participants