Bug 1336514 - shard: compiler warning format string
Summary: shard: compiler warning format string
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: GlusterFS
Classification: Community
Component: sharding
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Krutika Dhananjay
QA Contact: bugs@gluster.org
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-16 17:02 UTC by Kaleb KEITHLEY
Modified: 2019-04-17 09:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-17 09:35:01 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Kaleb KEITHLEY 2016-05-16 17:02:30 UTC
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:

Comment 1 Yaniv Kaul 2019-04-17 09:35:01 UTC
[ykaul@ykaul shard]$ make
Making all in src
  CC       shard.lo
  CCLD     shard.la
make[1]: Nothing to be done for 'all-am'.


Note You need to log in before you can comment on or make changes to this bug.