On Thu, Jun 14, 2012 at 5:52 AM, Glenn Fowler <[email protected]> wrote:
> On Thu, 14 Jun 2012 01:02:34 +0200 Roland Mainz wrote:
>> On Mon, Jun 11, 2012 at 4:39 PM, Roland Mainz <[email protected]> 
>> wrote:
>> > Attached (as "astopen20120606_janitor_statementnotreached001.diff") is
>> > a small cleanup patch which eliminates some of the "statement not
>> > reached" warnings reported by Sun Studio 12.1. AFAIK these changes are
>> > simple&&safe enougth for ksh93u+ ...
>> >
>> > There are a few remaining warnings which require some more thinking:
>> > 1. src/cmd/dsslib/bgp/bgp-mrt.c", line 1721: warning: statement not
>> > reached (E_STATEMENT_NOT_REACHED)
>> > This warning is about this function:
>> > -- snip --
>> > static int
>> > mrtwrite(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc)
>> > {
>> >        ANONYMIZE_WRITE(file, record, disc);
>> >        if (disc->errorf)
>> >                (*disc->errorf)(NiL, disc, 2, "%s: record write not 
>> > implemented",
>> > file->format->name);
>> >        return -1;
>> > }
>> > -- snip --
>> > ... it sounds like that any code beginning with |if (disk->errorf)| is
>> > not executed.. which doesn't sound like this is intended.
>> >
>> > 2. src/cmd/kshlib/dss/dss.c", line 189: warning: statement not reached
>> > (E_STATEMENT_NOT_REACHED)
>> > This is about the following code... I guess there is a |if
>> > (...)|-statement missing:
>> > -- snip --
>> >        data->data = bp->vnode->nvalue;
>> >        data->size = nv_size(bp->vnode);
>> >                return(1);
>> >        if(qp->sel)
>> > -- snip --
>
>> Erm... was the patch attached to the original posting applied to the
>> AST codebase ? I haven't checked but I just saw two of these
>> "statement not reached" warnings coming through the log of an active
>> ast-open.2012-06-12 build...
>
> both of these were patched for 2012-06-12

Erm... there was a patch attached to that email (I've attached it
again as "astopen20120606_janitor_statementnotreached001.diff"),
too...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
diff -r -u src/cmd/3d/mkdir3d.c src/cmd/3d/mkdir3d.c
--- src/cmd/3d/mkdir3d.c	Sat Apr 10 10:29:09 2010
+++ src/cmd/3d/mkdir3d.c	Mon Jun 11 15:54:21 2012
@@ -111,8 +111,6 @@
 					errno = oerrno;
 					return -1;
 				}
-			state.path = save;
-			errno = oerrno;
 		}
 
 		/*
diff -r -u src/cmd/dsslib/bgp/bgp-cisco.c src/cmd/dsslib/bgp/bgp-cisco.c
--- src/cmd/dsslib/bgp/bgp-cisco.c	Thu Aug 11 08:53:56 2011
+++ src/cmd/dsslib/bgp/bgp-cisco.c	Mon Jun 11 15:54:51 2012
@@ -79,7 +79,6 @@
 		    isdigit(*f) && !strtoip4(f, &t, &addr, &bits) && *t == ' ')
 			return 1;
 	}
-	return 0;
 }
 
 /*
diff -r -u src/cmd/dsslib/bgp/bgp-ciscov6.c src/cmd/dsslib/bgp/bgp-ciscov6.c
--- src/cmd/dsslib/bgp/bgp-ciscov6.c	Thu Aug 11 08:54:32 2011
+++ src/cmd/dsslib/bgp/bgp-ciscov6.c	Mon Jun 11 15:55:38 2012
@@ -81,7 +81,6 @@
 			return 1;
 		}
 	}
-	return 0;
 }
 
 /*
diff -r -u src/cmd/dsslib/bgp/bgp-table.c src/cmd/dsslib/bgp/bgp-table.c
--- src/cmd/dsslib/bgp/bgp-table.c	Thu Aug 11 08:58:48 2011
+++ src/cmd/dsslib/bgp/bgp-table.c	Mon Jun 11 15:56:53 2012
@@ -77,7 +77,6 @@
 		if (isdigit(*f) && !strtoip4(f, NiL, &addr, &bits) || !strtoip6(f, NiL, prefix, prefix + IP6BITS) && (file->caller = file))
 			return 1;
 	}
-	return 0;
 }
 
 /*
diff -r -u src/cmd/ksh93/sh/name.c src/cmd/ksh93/sh/name.c
--- src/cmd/ksh93/sh/name.c	Wed Jun  6 17:35:10 2012
+++ src/cmd/ksh93/sh/name.c	Mon Jun 11 15:53:54 2012
@@ -1245,7 +1245,6 @@
 			cp = xp;
 		}
 	}
-	return(np);
 }
 
 /*
diff -r -u src/lib/libtksh/src/tclIO.c src/lib/libtksh/src/tclIO.c
--- src/lib/libtksh/src/tclIO.c	Wed Mar 12 18:47:33 2003
+++ src/lib/libtksh/src/tclIO.c	Mon Jun 11 15:58:29 2012
@@ -3642,6 +3642,8 @@
             }
         }
     }
+    chanPtr->flags &= (~(CHANNEL_BLOCKED));
+    return copied;
 #else
 	chanSetFlags(chanPtr);
 	chanPtr->flags &= (~(CHANNEL_BLOCKED));
@@ -3648,8 +3650,6 @@
 	copied = sfread(chanPtr->sfPtr, bufPtr, toRead);
 	return copied;
 #endif
-    chanPtr->flags &= (~(CHANNEL_BLOCKED));
-    return copied;
 }
 
 /*
diff -r -u src/lib/libtksh/src/var.c src/lib/libtksh/src/var.c
--- src/lib/libtksh/src/var.c	Wed Jul 23 09:53:45 2008
+++ src/lib/libtksh/src/var.c	Mon Jun 11 15:57:58 2012
@@ -709,7 +709,6 @@
 		nv_offattr(nv, NV_NODISC); nv_resumedisc(nv);
 		return nv_getv(nv, nf);
 	}
-	return NULL;
 }
 
 
diff -r -u src/lib/libuu/uulib.c src/lib/libuu/uulib.c
--- src/lib/libuu/uulib.c	Thu Sep 24 16:06:45 2009
+++ src/lib/libuu/uulib.c	Mon Jun 11 15:54:36 2012
@@ -916,7 +916,6 @@
 			break;
 		}
 	}
-	return -1;
 }
 
 /*
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to