master - man-generator: fix compiler warnings
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1236e0ed293d13bff1205dbd2ac31877278b7a90 Commit: 1236e0ed293d13bff1205dbd2ac31877278b7a90 Parent: 1dddb068c90d553957dd8668b76c3eb9734b2e95 Author: David Teigland <[email protected]> AuthorDate: Tue Feb 14 10:28:52 2017 -0600 Committer: David Teigland <[email protected]> CommitterDate: Tue Feb 14 10:28:52 2017 -0600
man-generator: fix compiler warnings
--- tools/command.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
tools/command.c +3 -4
@@ -2181,7 +2181,7 @@ void print_man_usage(char *lvmname, struct command *cmd)void print_man_usage_common (struct command *cmd) {struct command_name *cname; -int i, sep, ro, rp, oo, op, opt_enum; +int i, sep, rp, oo, op, opt_enum;if (!(cname =find_command_name (cmd->name)))return ;
@@ -2569,7 +2569,7 @@ static void include_description_file(char *name, char *des_file)if (fd <0 )return ; -read (fd, buf,sizeof (buf)); + (void )read (fd, buf,sizeof (buf)); buf[MAX_MAN_DESC -1 ] ='\0' ;
@@ -2584,8 +2584,7 @@ void print_man(char *name, char *des_file, int include_primary, int include_secostruct command_name *cname;struct command *cmd, *prev_cmd =NULL ;char *lvmname = name; -const char *desc; -int i, j, ro, rp, oo, op; +int i;if (!strncmp (name,"lvm-" ,4 )) name +=4 ;
Dne 14.2.2017 v 17:29 David Teigland napsal(a):
Quoted 28 lines
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1236e0ed293d13bff1205dbd2ac31877278b7a90 Commit: 1236e0ed293d13bff1205dbd2ac31877278b7a90 Parent: 1dddb068c90d553957dd8668b76c3eb9734b2e95 Author: David Teigland <[email protected]> AuthorDate: Tue Feb 14 10:28:52 2017 -0600 Committer: David Teigland <[email protected]> CommitterDate: Tue Feb 14 10:28:52 2017 -0600man-generator: fix compiler warnings
--- tools/command.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)tools/command.c +1
-1@@ -2181,7 +2181,7 @@ void print_man_usage(char *lvmname, struct command *cmd)void print_man_usage_common (struct command *cmd) {struct command_name *cname; -int i, sep, ro, rp, oo, op, opt_enum; +int i, sep, rp, oo, op, opt_enum;if (!(cname =find_command_name (cmd->name)))return ;
tools/command.c static void include_description_file(char *name, char *des_file) · line 2572
Quoted 5 lines
tools/command.c +1
-1@@ -2569,7 +2569,7 @@ static void include_description_file(char *name, char *des_file)if (fd <0 )return ; -read (fd, buf,sizeof (buf)); + (void )read (fd, buf,sizeof (buf));
I'd say this is not the best approach how to handle any read failure.
Z.