Delete the useless 'char *av[2], bigarg[82];' definition. Fix the 'ignoring return value of read(2)' compilation warnings.
Signed-off-by: Xiaoguang Wang <wangxg.f...@cn.fujitsu.com> --- pan/ltp-pan.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pan/ltp-pan.c b/pan/ltp-pan.c index 6a1a797..9324f47 100644 --- a/pan/ltp-pan.c +++ b/pan/ltp-pan.c @@ -453,13 +453,6 @@ int main(int argc, char **argv) * this is an "active file cleanliness" thing */ { - char *av[2], bigarg[82]; - - memset(bigarg, '.', 81); - bigarg[81] = '\0'; - av[0] = bigarg; - av[1] = NULL; - for (c = 0; c < keep_active; c++) { if (zoo_mark_cmdline(zoofile, c, panname, "")) { fprintf(stderr, "pan(%s): %s\n", panname, @@ -1026,7 +1019,8 @@ run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode, char *termtype; struct tms notime = { 0, 0, 0, 0 }; - read(errpipe[0], errbuf, errlen); + if (read(errpipe[0], errbuf, errlen) < 0) + fprintf(stderr, "Failed to read from errpipe[0]\n"); close(errpipe[0]); errbuf[errlen] = '\0'; /* fprintf(stderr, "%s", errbuf); */ -- 1.8.2.1 ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list