[Bugs] [Bug 1336514] New: shard: compiler warning format string

bugzilla at redhat.com bugzilla at redhat.com
Mon May 16 17:02:30 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1336514

            Bug ID: 1336514
           Summary: shard: compiler warning format string
           Product: GlusterFS
           Version: mainline
         Component: sharding
          Assignee: bugs at gluster.org
          Reporter: kkeithle at redhat.com
        QA Contact: bugs at gluster.org
                CC: bugs at gluster.org



Description of problem:

Making all in shard
Making all in src
  CC       shard.lo
shard.c: In function '__shard_inode_ctx_get':
shard.c:70:24: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
                 *ctx = (shard_inode_ctx_t *) ctx_uint;
                        ^
shard.c: In function '__shard_inode_ctx_get_block_size':
shard.c:223:15: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
         ctx = (shard_inode_ctx_t *) ctx_uint;
               ^
shard.c: In function '__shard_inode_ctx_get_all':
shard.c:258:15: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
         ctx = (shard_inode_ctx_t *) ctx_uint;
               ^
shard.c: In function '__shard_inode_ctx_fill_iatt_from_cache':
shard.c:292:15: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
         ctx = (shard_inode_ctx_t *) ctx_uint;
               ^
shard.c: In function '__shard_get_delta_size_from_inode_ctx':
shard.c:3452:15: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
         ctx = (shard_inode_ctx_t *) ctx_uint;
               ^
In file included from ../../../../libglusterfs/src/common-utils.h:35:0,
                 from ../../../../libglusterfs/src/circ-buff.h:14,
                 from ../../../../libglusterfs/src/event-history.h:15,
                 from ../../../../libglusterfs/src/xlator.h:18,
                 from shard.h:15,
                 from shard.c:13:
shard.c: In function 'shard_common_inode_write_begin':
shard.c:4575:38: warning: format '%lu' expects argument of type 'long unsigned
int', but argument 16 has type 'size_t {aka unsigned int}' [-Wformat=]
         gf_msg_trace (this->name, 0, "%s: gfid=%s first_block=%"PRIu32" "
                                      ^
../../../../libglusterfs/src/logging.h:253:55: note: in definition of macro
'gf_msg_trace'
                         GF_LOG_TRACE, errnum, 0, 0, ##fmt);             \
                                                       ^~~
In file included from ../../../../libglusterfs/src/xlator.h:65:0,
                 from shard.h:15,
                 from shard.c:13:
shard.c: In function 'reconfigure':
../../../../libglusterfs/src/options.h:258:48: warning: passing argument 4 of
'xlator_option_reconf_size' from incompatible pointer type
[-Wincompatible-pointer-types]
                                                &(val));             \
                                                ^
shard.c:4756:9: note: in expansion of macro 'GF_OPTION_RECONF'
         GF_OPTION_RECONF ("shard-block-size", priv->block_size, options, size,
         ^~~~~~~~~~~~~~~~
../../../../libglusterfs/src/options.h:185:1: note: expected 'size_t * {aka
unsigned int *}' but argument is of type 'uint64_t * {aka long long unsigned
int *}'
 xlator_option_reconf_##type (xlator_t *this, dict_t *options, char *key,\
 ^
../../../../libglusterfs/src/options.h:193:1: note: in expansion of macro
'DECLARE_RECONF_OPT'
 DECLARE_RECONF_OPT(size_t, size);
 ^~~~~~~~~~~~~~~~~~
shard.c: In function 'shard_forget':
shard.c:4775:15: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
         ctx = (shard_inode_ctx_t *)ctx_uint;
               ^
  CCLD     shard.la




Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list