tunefs: Don't lower WARNS
Use casts to silence the alignment warnings instead of potentially suppressing other legitimate warnings. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56033
This commit is contained in:
@@ -3,6 +3,4 @@ PROG= tunefs
|
||||
LIBADD= ufs util
|
||||
MAN= tunefs.8
|
||||
|
||||
WARNS?= 3
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
@@ -640,7 +640,7 @@ dir_search(ufs2_daddr_t blk, int bytes)
|
||||
return (-1);
|
||||
}
|
||||
for (off = 0; off < bytes; off += dp->d_reclen) {
|
||||
dp = (struct direct *)&block[off];
|
||||
dp = (struct direct *)(uintptr_t)&block[off];
|
||||
if (dp->d_reclen == 0)
|
||||
break;
|
||||
if (dp->d_ino == 0)
|
||||
@@ -705,7 +705,7 @@ dir_clear_block(const char *block, off_t off)
|
||||
struct direct *dp;
|
||||
|
||||
for (; off < sblock.fs_bsize; off += DIRBLKSIZ) {
|
||||
dp = (struct direct *)&block[off];
|
||||
dp = (struct direct *)(uintptr_t)&block[off];
|
||||
dp->d_ino = 0;
|
||||
dp->d_reclen = DIRBLKSIZ;
|
||||
dp->d_type = DT_UNKNOWN;
|
||||
@@ -728,7 +728,7 @@ dir_insert(ufs2_daddr_t blk, off_t off, ino_t ino)
|
||||
return (-1);
|
||||
}
|
||||
bzero(&block[off], sblock.fs_bsize - off);
|
||||
dp = (struct direct *)&block[off];
|
||||
dp = (struct direct *)(uintptr_t)&block[off];
|
||||
dp->d_ino = ino;
|
||||
dp->d_reclen = DIRBLKSIZ;
|
||||
dp->d_type = DT_REG;
|
||||
|
||||
Reference in New Issue
Block a user