Hi!
>       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;

I don't like that we do this just to silence compiler warning.

Can't we issue an error message in case that the read() failed instead?

i.e.

        if (read(errpipe[0], errbuf, errlen))
                fprintf(stderr, "Failed to read errbuf\n");

-- 
Cyril Hrubis
chru...@suse.cz

------------------------------------------------------------------------------
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