xfs: convert btree buffer log flags to unsigned.
5.18 w/ std=gnu11 compiled with gcc-5 wants flags stored in unsigned fields to be unsigned. We also pass the fields to log to xfs_btree_offsets() as a uint32_t all cases now. I have no idea why we made that parameter a int64_t in the first place, but while we are fixing this up change it to a uint32_t field, too. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Chandan Babu R <chandan.babu@oracle.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
@ -751,20 +751,20 @@ xfs_btree_lastrec(
|
||||
*/
|
||||
void
|
||||
xfs_btree_offsets(
|
||||
int64_t fields, /* bitmask of fields */
|
||||
uint32_t fields, /* bitmask of fields */
|
||||
const short *offsets, /* table of field offsets */
|
||||
int nbits, /* number of bits to inspect */
|
||||
int *first, /* output: first byte offset */
|
||||
int *last) /* output: last byte offset */
|
||||
{
|
||||
int i; /* current bit number */
|
||||
int64_t imask; /* mask for current bit number */
|
||||
uint32_t imask; /* mask for current bit number */
|
||||
|
||||
ASSERT(fields != 0);
|
||||
/*
|
||||
* Find the lowest bit, so the first byte offset.
|
||||
*/
|
||||
for (i = 0, imask = 1LL; ; i++, imask <<= 1) {
|
||||
for (i = 0, imask = 1u; ; i++, imask <<= 1) {
|
||||
if (imask & fields) {
|
||||
*first = offsets[i];
|
||||
break;
|
||||
@ -773,7 +773,7 @@ xfs_btree_offsets(
|
||||
/*
|
||||
* Find the highest bit, so the last byte offset.
|
||||
*/
|
||||
for (i = nbits - 1, imask = 1LL << i; ; i--, imask >>= 1) {
|
||||
for (i = nbits - 1, imask = 1u << i; ; i--, imask >>= 1) {
|
||||
if (imask & fields) {
|
||||
*last = offsets[i + 1] - 1;
|
||||
break;
|
||||
@ -1456,7 +1456,7 @@ void
|
||||
xfs_btree_log_block(
|
||||
struct xfs_btree_cur *cur, /* btree cursor */
|
||||
struct xfs_buf *bp, /* buffer containing btree block */
|
||||
int fields) /* mask of fields: XFS_BB_... */
|
||||
uint32_t fields) /* mask of fields: XFS_BB_... */
|
||||
{
|
||||
int first; /* first byte offset logged */
|
||||
int last; /* last byte offset logged */
|
||||
|
Reference in New Issue
Block a user