Bug 764676 (GLUSTER-2944) - warnings in cli_out
Summary: warnings in cli_out
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-2944
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-25 10:26 UTC by Amar Tumballi
Modified: 2013-12-19 00:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Amar Tumballi 2011-05-25 10:26:02 UTC
While reviewing code, found that 'cli_out()' doesn't check for format errors during the compile time. Added a check like 'gf_log()' and the result is below.


../../../cli/src/cli-cmd-volume.c: In function ‘cli_cmd_volume_stop_cbk’:
../../../cli/src/cli-cmd-volume.c:397: warning: too many arguments for format
../../../cli/src/cli-cmd-volume.c: In function ‘cli_cmd_volume_rename_cbk’:
../../../cli/src/cli-cmd-volume.c:453: warning: too many arguments for format
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_get_volume_cbk’:
../../../cli/src/cli-rpc-ops.c:461: warning: zero-length gnu_printf format string
../../../cli/src/cli-rpc-ops.c:505: warning: too many arguments for format
../../../cli/src/cli-rpc-ops.c:598: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_delete_volume_cbk’:
../../../cli/src/cli-rpc-ops.c:688: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_stop_volume_cbk’:
../../../cli/src/cli-rpc-ops.c:785: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_defrag_volume_cbk’:
../../../cli/src/cli-rpc-ops.c:834: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c:843: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c:856: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_log_filename_cbk’:
../../../cli/src/cli-rpc-ops.c:1225: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_log_rotate_cbk’:
../../../cli/src/cli-rpc-ops.c:1284: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_sync_volume_cbk’:
../../../cli/src/cli-rpc-ops.c:1316: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_log_level_cbk’:
../../../cli/src/cli-rpc-ops.c:2316: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_fsm_log_cbk’:
../../../cli/src/cli-rpc-ops.c:2583: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘cmd_profile_volume_brick_out’:
../../../cli/src/cli-rpc-ops.c:3029: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c:3030: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c:3031: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c:3032: warning: zero-length gnu_printf format string
../../../cli/src/cli-rpc-ops.c:3047: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c:3048: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c:3049: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c:3069: warning: zero-length gnu_printf format string
../../../cli/src/cli-rpc-ops.c:3073: warning: zero-length gnu_printf format string
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_profile_volume_cbk’:
../../../cli/src/cli-rpc-ops.c:3128: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_top_volume_cbk’:
../../../cli/src/cli-rpc-ops.c:3259: warning: format not a string literal and no format arguments
../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli3_1_getwd_cbk’:
../../../cli/src/cli-rpc-ops.c:3455: warning: format not a string literal and no format arguments

Comment 1 Anand Avati 2011-05-31 14:01:30 UTC
PATCH: http://patches.gluster.com/patch/7242 in master (cli: fix format string build warnings)

Comment 2 Anand Avati 2011-05-31 14:01:34 UTC
PATCH: http://patches.gluster.com/patch/7243 in master (cli: bring in format checking option for 'cli_out()')

Comment 3 Anand Avati 2011-06-01 04:56:03 UTC
PATCH: http://patches.gluster.com/patch/7349 in master (cli: fix the build warning message)

Comment 4 Raghavendra Bhat 2011-06-07 02:30:07 UTC
These errors are not found now.


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