diff options
author | Toomas Soome <tsoome@me.com> | 2018-02-19 20:32:44 +0200 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2018-07-19 13:02:24 -0400 |
commit | 566b4223c74de6cad48ddbedf35a12d6a511c8c5 (patch) | |
tree | db4f509f3175250d49203878c8c1e0c08f92a5b9 /usr/src/ucbcmd/sed | |
parent | 65d28c0b2556a9bb47ed2b033469a4182ff5b488 (diff) | |
download | illumos-gate-566b4223c74de6cad48ddbedf35a12d6a511c8c5.tar.gz |
9133 ucbcmd: this statement may fall through
Reviewed by: Andrew Stormont <astormont@racktopsystems.com>
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Ken Mays <kmays2000@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/ucbcmd/sed')
-rw-r--r-- | usr/src/ucbcmd/sed/sed.h | 7 | ||||
-rw-r--r-- | usr/src/ucbcmd/sed/sed0.c | 3 | ||||
-rw-r--r-- | usr/src/ucbcmd/sed/sed1.c | 7 |
3 files changed, 6 insertions, 11 deletions
diff --git a/usr/src/ucbcmd/sed/sed.h b/usr/src/ucbcmd/sed/sed.h index f814ce4ef6..465d38613d 100644 --- a/usr/src/ucbcmd/sed/sed.h +++ b/usr/src/ucbcmd/sed/sed.h @@ -30,8 +30,6 @@ #ifndef _SED_H #define _SED_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * sed -- stream editor */ @@ -49,7 +47,6 @@ #define PEEKC() (*sp) #define UNGETC(c) (--sp) #define RETURN(c) cp = sp; return(ep); -#define ERROR(c) regerr(c) #define CEND 16 #define CLNUM 14 @@ -153,7 +150,9 @@ char *compsub(); struct label *search(); char *gline(); char *place(); -void comperr(char *); +void comperr(char *) __NORETURN; +void regerr(int) __NORETURN; +#define ERROR(c) regerr(c) void execute(char *); #endif /* _SED_H */ diff --git a/usr/src/ucbcmd/sed/sed0.c b/usr/src/ucbcmd/sed/sed0.c index 5be6112e36..1b5e3881bf 100644 --- a/usr/src/ucbcmd/sed/sed0.c +++ b/usr/src/ucbcmd/sed/sed0.c @@ -27,6 +27,7 @@ /* All Rights Reserved */ #include <stdio.h> +#include <stdlib.h> #include <sys/param.h> #include "sed.h" @@ -70,8 +71,6 @@ char TOOBIG[] = "Suffix too large - 512 max: %s"; extern int sed; /* IMPORTANT flag !!! */ extern char *comple(); -extern char *malloc(); - static void dechain(void); static void fcomp(void); diff --git a/usr/src/ucbcmd/sed/sed1.c b/usr/src/ucbcmd/sed/sed1.c index c5f5d89144..c4777340df 100644 --- a/usr/src/ucbcmd/sed/sed1.c +++ b/usr/src/ucbcmd/sed/sed1.c @@ -27,10 +27,8 @@ /* Copyright (c) 1984 AT&T */ /* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> +#include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -667,7 +665,7 @@ char *ep; return(p); } -int +void regerr(int err) { switch(err) { @@ -726,7 +724,6 @@ regerr(int err) exit(2); break; } - return (0); } static void |