Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
@@ -8,11 +8,11 @@
* source. A copy of the CDDL is also available via the Internet at
* http://www.illumos.org/license/CDDL.
*/
/*
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
/*
* Utility functions for use in both acquire-lock and runtests.
*/
@@ -99,11 +99,10 @@
return (LSTYLE_OFD);
} else if (strcmp(stylestr, "flock") == 0) {
return (LSTYLE_FLOCK);
} else {
errx(EXIT_FAILURE, BAD_LOCK_MESSAGE);
- return (LSTYLE_LAST);
}
}
char *
@@ -116,11 +115,10 @@
return ("ofd");
case LSTYLE_FLOCK:
return ("flock");
default:
abort();
- return ("<unreachable>");
}
}
char *
@@ -133,11 +131,10 @@
return ("fcntl(2) OFD");
case LSTYLE_FLOCK:
return ("flock(3C)");
default:
abort();
- return ("<unreachable>");
}
}
void
@@ -176,8 +173,7 @@
case F_OFD_GETLK64:
return ("F_OFD_GETLK64");
#endif
default:
abort();
- return ("<unreachable>");
}
}