Delete the useless 'char *av[2];' 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 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pan/ltp-pan.c b/pan/ltp-pan.c
index 6a1a797..c36a9ee 100644
--- a/pan/ltp-pan.c
+++ b/pan/ltp-pan.c
@@ -453,12 +453,10 @@ int main(int argc, char **argv)
         * this is an "active file cleanliness" thing
         */
        {
-               char *av[2], bigarg[82];
+               char 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, "")) {
@@ -864,6 +862,7 @@ run_child(struct coll_entry *colle, struct tag_pgrp 
*active, int quiet_mode,
        static long cmdno = 0;
        int errpipe[2];         /* way to communicate to parent that the tag  */
        char errbuf[1024];      /* didn't actually start */
+       int ret;
 
        /* Try to open the file that will be stdout for the test */
        if (test_out_dir) {
@@ -1026,7 +1025,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);
+               ret = read(errpipe[0], errbuf, errlen);
+               (void)ret;
                close(errpipe[0]);
                errbuf[errlen] = '\0';
                /* fprintf(stderr, "%s", errbuf); */
-- 
1.8.2.1


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to