Bug 764676 (GLUSTER-2944)

Summary: warnings in cli_out
Product: [Community] GlusterFS Reporter: Amar Tumballi <amarts>
Component: cliAssignee: Amar Tumballi <amarts>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs, rabhat, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.