Whamcloud - gitweb
LU-5030 utils: fix lnet/utils/debug.c compile issue 00/17900/3
authorJames Simmons <uja.ornl@yahoo.com>
Mon, 11 Jan 2016 14:38:27 +0000 (09:38 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 18 Jan 2016 05:56:46 +0000 (05:56 +0000)
The source file debug.c will fail to compile if gcc
uses the flag -Werror=format-security. The solution
is to add "%s" to cfs_get_param_path().

Change-Id: If0fb438010f692e11432aa1539218d16c9e4548e
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/17900
Tested-by: Jenkins
Reviewed-by: Ryan Haasken <haasken@cray.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/utils/debug.c

index babadc7..6491541 100644 (file)
@@ -92,7 +92,7 @@ dbg_open_ctlhandle(const char *str)
        glob_t path;
        int fd, rc;
 
        glob_t path;
        int fd, rc;
 
-       rc = cfs_get_param_paths(&path, str);
+       rc = cfs_get_param_paths(&path, "%s", str);
        if (rc != 0) {
                fprintf(stderr, "invalid parameter '%s'\n", str);
                return -1;
        if (rc != 0) {
                fprintf(stderr, "invalid parameter '%s'\n", str);
                return -1;