summaryrefslogtreecommitdiff
path: root/usr/src/lib/efcode/engine
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/efcode/engine')
-rw-r--r--usr/src/lib/efcode/engine/alarm.c14
-rw-r--r--usr/src/lib/efcode/engine/debug.c30
-rw-r--r--usr/src/lib/efcode/engine/env.c44
-rw-r--r--usr/src/lib/efcode/engine/extend.c4
-rw-r--r--usr/src/lib/efcode/engine/fcode.c9
-rw-r--r--usr/src/lib/efcode/engine/forth.c8
-rw-r--r--usr/src/lib/efcode/engine/interactive.c22
-rw-r--r--usr/src/lib/efcode/engine/log.c18
-rw-r--r--usr/src/lib/efcode/engine/package.c8
-rw-r--r--usr/src/lib/efcode/engine/properties.c4
-rw-r--r--usr/src/lib/efcode/engine/signal.c24
11 files changed, 85 insertions, 100 deletions
diff --git a/usr/src/lib/efcode/engine/alarm.c b/usr/src/lib/efcode/engine/alarm.c
index c9d4550a9d..a50f965d8e 100644
--- a/usr/src/lib/efcode/engine/alarm.c
+++ b/usr/src/lib/efcode/engine/alarm.c
@@ -24,8 +24,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -54,8 +52,8 @@ catch_alarm(int signo)
if (env && alarm_xt && alarm_ms) {
PUSH(DS, alarm_xt);
execute(env);
- signal(SIGALRM, catch_alarm);
- alarm((alarm_ms + 999)/1000);
+ (void) signal(SIGALRM, catch_alarm);
+ (void) alarm((alarm_ms + 999)/1000);
}
}
@@ -71,17 +69,17 @@ do_alarm(fcode_env_t *env)
ms = POP(DS);
xt = POP(DS);
if (ms == 0) {
- alarm(0);
- signal(SIGALRM, SIG_DFL);
+ (void) alarm(0);
+ (void) signal(SIGALRM, SIG_DFL);
alarm_xt = 0;
alarm_ms = 0;
alarm_env = 0;
} else {
- signal(SIGALRM, catch_alarm);
+ (void) signal(SIGALRM, catch_alarm);
alarm_xt = xt;
alarm_ms = ms;
alarm_env = env;
- alarm((ms + 999)/1000);
+ (void) alarm((ms + 999)/1000);
}
}
diff --git a/usr/src/lib/efcode/engine/debug.c b/usr/src/lib/efcode/engine/debug.c
index bbc32ebdf5..e00496944e 100644
--- a/usr/src/lib/efcode/engine/debug.c
+++ b/usr/src/lib/efcode/engine/debug.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -97,7 +95,7 @@ output_return_stack(fcode_env_t *env, int show_wa, int msglevel)
for (i = (RS - env->rs0) - 1; i > 0; i--) {
anyout++;
log_message(msglevel, "%s ",
- acf_backup_search(env, (acf_t)env->rs0[i+1]));
+ acf_backup_search(env, (acf_t)env->rs0[i+1]));
}
if (!anyout)
log_message(msglevel, "<empty> ");
@@ -239,7 +237,7 @@ acf_to_str(acf_t acf)
{
static char msg[(sizeof (acf) * 2) + 3];
- sprintf(msg, "(%08p)", acf);
+ (void) sprintf(msg, "(%08p)", acf);
return (msg);
}
@@ -622,9 +620,9 @@ verify_usage(fcode_env_t *env)
verify = env->table[i].flags & (ANSI_WORD|P1275_WORD);
if ((verify) &&
#ifdef DEBUG
- (env->table[i].usage == 0) &&
+ (env->table[i].usage == 0) &&
#endif
- (env->table[i].apf)) {
+ (env->table[i].apf)) {
log_message(MSG_DEBUG,
"Untested: %4x %32s acf = %8p, %8p\n", i,
env->table[i].name, env->table[i].apf,
@@ -726,11 +724,11 @@ debug_flags_to_mask(char *str)
if (*str == '0') {
str++;
if (*str == 'x' || *str == 'X') {
- sscanf(str + 1, "%x", &flags);
+ (void) sscanf(str + 1, "%x", &flags);
} else
- sscanf(str, "%o", &flags);
+ (void) sscanf(str, "%o", &flags);
} else
- sscanf(str, "%d", &flags);
+ (void) sscanf(str, "%d", &flags);
return (flags);
}
if (strcmp(str, "clear") == 0)
@@ -929,13 +927,13 @@ ctrace(fcode_env_t *env)
FILE *fd;
log_message(MSG_DEBUG, "Interpreter C Stack:\n");
- sprintf(buf, "/usr/proc/bin/pstack %d", getpid());
+ (void) sprintf(buf, "/usr/proc/bin/pstack %d", getpid());
if ((fd = popen(buf, "r")) == NULL)
log_perror(MSG_ERROR, "Can't run: %s", buf);
else {
while (fgets(buf, sizeof (buf), fd))
log_message(MSG_DEBUG, buf);
- fclose(fd);
+ (void) fclose(fd);
}
}
@@ -969,7 +967,7 @@ forth_abort(fcode_env_t *env, char *fmt, ...)
in_forth_abort++;
va_start(ap, fmt);
- vsprintf(msg, fmt, ap);
+ (void) vsprintf(msg, fmt, ap);
log_message(MSG_ERROR, "ABORT: %s\n", msg);
if (env) {
@@ -995,7 +993,7 @@ forth_perror(fcode_env_t *env, char *fmt, ...)
int save_errno = errno; /* just in case... */
va_start(ap, fmt);
- vsprintf(msg, fmt, ap);
+ (void) vsprintf(msg, fmt, ap);
forth_abort(env, "%s: %s", msg, strerror(save_errno));
}
@@ -1048,7 +1046,7 @@ dump(fcode_env_t *env)
offset = ((long)data) & 0xf;
len += offset;
data = (uchar_t *)((long)data & ~0xf);
- sprintf(buf, "%p", data);
+ (void) sprintf(buf, "%p", data);
print_bytes_header(strlen(buf), offset);
for (len += offset; len > 0; len -= 16, data += 16)
dump_line(data);
@@ -1412,7 +1410,7 @@ dot_calls(fcode_env_t *env)
{
acf_t acf = (acf_t)POP(DS);
- search_all_dictionaries(env, do_dot_calls, acf);
+ (void) search_all_dictionaries(env, do_dot_calls, acf);
output_acf_name(NULL);
}
@@ -1484,7 +1482,7 @@ do_memory_watch(fcode_env_t *env)
"memory-watch: %p/%d: %llx -> %llx\n",
mw_addr, mw_size, (uint64_t)mw_lastvalue,
(uint64_t)value);
- do_fclib_step(env);
+ (void) do_fclib_step(env);
}
mw_lastvalue = value;
}
diff --git a/usr/src/lib/efcode/engine/env.c b/usr/src/lib/efcode/engine/env.c
index 16431b21dd..5d6580dcb8 100644
--- a/usr/src/lib/efcode/engine/env.c
+++ b/usr/src/lib/efcode/engine/env.c
@@ -64,7 +64,7 @@ do_emit(fcode_env_t *env, uchar_t c)
if (isatty(fileno(stdout))) {
if ((c >= 0x20 && c <= 0x7f) || c == '\n' || c == '\r' ||
c == '\b')
- putchar(c);
+ (void) putchar(c);
else if (c < 0x20)
printf("@%c", c + '@');
else
@@ -100,14 +100,14 @@ keyquestion(fcode_env_t *env)
{
struct timeval timeval;
fd_set readfds;
- int ret;
if (isatty(fileno(stdin))) {
FD_ZERO(&readfds);
FD_SET(fileno(stdin), &readfds);
timeval.tv_sec = 0;
timeval.tv_usec = 1000;
- ret = select(fileno(stdin) + 1, &readfds, NULL, NULL, &timeval);
+ (void) select(fileno(stdin) + 1, &readfds, NULL, NULL,
+ &timeval);
if (FD_ISSET(fileno(stdin), &readfds))
PUSH(DS, TRUE);
else
@@ -125,7 +125,7 @@ key(fcode_env_t *env)
uchar_t c;
if (isatty(fileno(stdin))) {
- read(fileno(stdin), &c, 1);
+ (void) read(fileno(stdin), &c, 1);
PUSH(DS, c);
} else
forth_abort(env, "'key' called in non-interactive mode");
@@ -178,7 +178,7 @@ expect(fcode_env_t *env)
read_line(env);
rbuf = pop_a_string(env, NULL);
if (rbuf) {
- strcpy(buf, rbuf);
+ (void) strcpy(buf, rbuf);
env->span = strlen(buf);
} else
env->span = 0;
@@ -201,7 +201,7 @@ do_ms(fcode_env_t *env)
if (d) {
rqtp.tv_sec = 0;
rqtp.tv_nsec = d*1000*1000;
- nanosleep(&rqtp, 0);
+ (void) nanosleep(&rqtp, 0);
}
}
@@ -212,12 +212,12 @@ do_get_msecs(fcode_env_t *env)
long ms;
timespec_t rqtp;
- gettimeofday(&tp, NULL);
+ (void) gettimeofday(&tp, NULL);
ms = (tp.tv_usec/1000) + (tp.tv_sec * 1000);
PUSH(DS, (fstack_t)ms);
rqtp.tv_sec = 0;
rqtp.tv_nsec = 1000*1000;
- nanosleep(&rqtp, 0);
+ (void) nanosleep(&rqtp, 0);
}
#define CMN_MSG_SIZE 256
@@ -334,7 +334,7 @@ validfmt(char *fmt, cmn_fmt_t *cfstr)
/* if too many digits in the width return error */
if (nbytes > CMN_MAX_DIGITS)
return (1);
- strncpy(cdigs, dig1, nbytes);
+ (void) strncpy(cdigs, dig1, nbytes);
cdigs[nbytes] = 0;
*cwidth = atoi(cdigs);
}
@@ -353,6 +353,7 @@ validfmt(char *fmt, cmn_fmt_t *cfstr)
case '%':
if (isll)
return (1);
+ /* FALLTHROUGH */
case 'd':
case 'x':
*format = *fmt;
@@ -408,6 +409,7 @@ fmt_args(fcode_env_t *env, int cw, int fw, char format, long *arg,
switch (format) {
case 'x':
cnv = 16;
+ /* FALLTHROUGH */
case 'd':
case 'c':
case 'p':
@@ -551,9 +553,9 @@ fmt_str(fcode_env_t *env, char *fmt, char *fmtbuf, int bsize)
}
bytes = pct - fmt;
- strncpy(tbuf, fmt, bytes);
- strncpy(tbuf+bytes, "%", 1);
- strncpy(tbuf+bytes+1, fmt+bytes, 1);
+ (void) strncpy(tbuf, fmt, bytes);
+ (void) strncpy(tbuf+bytes, "%", 1);
+ (void) strncpy(tbuf+bytes+1, fmt+bytes, 1);
bytes += 2;
tbuf[bytes] = 0;
@@ -561,25 +563,25 @@ fmt_str(fcode_env_t *env, char *fmt, char *fmtbuf, int bsize)
"fmt_str: invalid format type! (%s)\n",
tbuf+bytes-3);
- strncpy(fmtbuf, tbuf, bsize);
+ (void) strncpy(fmtbuf, tbuf, bsize);
return;
}
if (fw > 0) { /* process normal (not long) formats */
bytes = pct - fmt + fw;
- strncpy(tbuf, fmt, bytes);
+ (void) strncpy(tbuf, fmt, bytes);
tbuf[bytes] = 0;
} else {
/* if here, fw must be a long format */
if (*fmptr == 'p') {
bytes = pct - fmt - fw;
- strncpy(tbuf, fmt, bytes);
+ (void) strncpy(tbuf, fmt, bytes);
tbuf[bytes] = 0;
} else {
bytes = pct - fmt - fw - 2;
- strncpy(tbuf, fmt, bytes);
+ (void) strncpy(tbuf, fmt, bytes);
tbuf[bytes] = 'l';
- strncpy(tbuf+bytes+1, fmt+bytes, 2);
+ (void) strncpy(tbuf+bytes+1, fmt+bytes, 2);
tbuf[bytes+1+2] = 0;
}
}
@@ -616,7 +618,7 @@ fmt_str(fcode_env_t *env, char *fmt, char *fmtbuf, int bsize)
(void) snprintf(fmtbuf, bsize, tbuf, llarg);
} else
- strncpy(fmtbuf, fmt, bsize);
+ (void) strncpy(fmtbuf, fmt, bsize);
}
/*
@@ -718,13 +720,13 @@ fc_cmn_start(fcode_env_t *env, char *head, int path)
new->prev = root;
if (root != 0)
root->next = new;
- strcpy(new->buf, head);
+ (void) strcpy(new->buf, head);
new->len = strlen(head);
if (path && env->current_device) {
dpath = get_path(env, env->current_device);
- strcpy(new->buf+new->len, dpath);
+ (void) strcpy(new->buf+new->len, dpath);
new->len += strlen(dpath);
- strncpy(new->buf+new->len++, ": ", 2);
+ (void) strncpy(new->buf+new->len++, ": ", 2);
++new->len;
free(dpath);
}
diff --git a/usr/src/lib/efcode/engine/extend.c b/usr/src/lib/efcode/engine/extend.c
index 9e631012b2..edca69097d 100644
--- a/usr/src/lib/efcode/engine/extend.c
+++ b/usr/src/lib/efcode/engine/extend.c
@@ -24,8 +24,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <sys/shm.h>
#include <dlfcn.h>
@@ -57,7 +55,7 @@ static void
do_dlclose(fcode_env_t *env)
{
void *pl = (void *)POP(DS);
- dlclose(pl);
+ (void) dlclose(pl);
}
static void
diff --git a/usr/src/lib/efcode/engine/fcode.c b/usr/src/lib/efcode/engine/fcode.c
index e8cedb3816..2ddbda64fc 100644
--- a/usr/src/lib/efcode/engine/fcode.c
+++ b/usr/src/lib/efcode/engine/fcode.c
@@ -24,8 +24,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -339,7 +337,7 @@ token_common(fcode_env_t *env, int headered, int visible)
env->table[token].flags = 0;
if (len) {
env->table[token].name = MALLOC(len+1);
- strncpy(env->table[token].name, namebuff, len);
+ (void) strncpy(env->table[token].name, namebuff, len);
} else {
env->table[token].name = NULL;
}
@@ -542,7 +540,7 @@ byte_load(fcode_env_t *env)
DEBUGF(TOKEN_USAGE, entry->usage++);
PUSH(DS, (fstack_t)apf);
if ((env->state) &&
- ((entry->flags & IMMEDIATE) == 0)) {
+ ((entry->flags & IMMEDIATE) == 0)) {
/* Compile in references */
compile_comma(env);
} else {
@@ -709,7 +707,8 @@ get_token(fcode_env_t *env)
tok = POP(DS);
tok &= MAX_FCODE;
PUSH(DS, (fstack_t)env->table[tok].apf);
- if (env->table[tok].flags & IMMEDIATE) immediate = 1;
+ if (env->table[tok].flags & IMMEDIATE)
+ immediate = 1;
PUSH(DS, immediate);
}
diff --git a/usr/src/lib/efcode/engine/forth.c b/usr/src/lib/efcode/engine/forth.c
index 33bd2c37d1..ddf7007b5f 100644
--- a/usr/src/lib/efcode/engine/forth.c
+++ b/usr/src/lib/efcode/engine/forth.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -288,7 +286,7 @@ f_exit(fcode_env_t *env)
#define COMPARE(cmp, rhs) ((((s_lforth_t)TOS) cmp((s_lforth_t)(rhs))) ? \
TRUE : FALSE)
-#define UCOMPARE(cmp, rhs) ((((u_lforth_t)TOS) cmp((u_lforth_t)(rhs))) ? \
+#define UCOMPARE(cmp, rhs) ((((u_lforth_t)TOS) cmp((u_lforth_t)(rhs))) ? \
TRUE : FALSE)
#define EQUALS ==
#define NOTEQUALS !=
@@ -689,7 +687,7 @@ pack_str(fcode_env_t *env)
str = (char *)TOS;
TOS = (fstack_t)buf;
*buf++ = (uchar_t)len;
- strncpy(buf, str, (len&0xff));
+ (void) strncpy(buf, str, (len&0xff));
}
void
@@ -2416,7 +2414,7 @@ throw_from_fclib(fcode_env_t *env, fstack_t errcode, char *fmt, ...)
char msg[256];
va_start(ap, fmt);
- vsprintf(msg, fmt, ap);
+ (void) vsprintf(msg, fmt, ap);
if (errcode) {
diff --git a/usr/src/lib/efcode/engine/interactive.c b/usr/src/lib/efcode/engine/interactive.c
index 398f52a686..942f8dcd13 100644
--- a/usr/src/lib/efcode/engine/interactive.c
+++ b/usr/src/lib/efcode/engine/interactive.c
@@ -24,8 +24,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -104,7 +102,7 @@ defer(fcode_env_t *env)
PUSH(DS, (fstack_t)&crash_ptr);
name = parse_a_string(env, &len);
make_common_access(env, name, len, 1,
- env->instance_mode, &noop, &noop, &set_defer_actions);
+ env->instance_mode, &noop, &noop, &set_defer_actions);
}
void
@@ -343,7 +341,7 @@ load_file(fcode_env_t *env)
if (fd < 0) {
forth_perror(env, "Can't open '%s'", name);
}
- fstat(fd, &buf);
+ (void) fstat(fd, &buf);
len = buf.st_size;
buffer = MALLOC(len);
if (buffer == 0)
@@ -352,7 +350,7 @@ load_file(fcode_env_t *env)
if ((n = read(fd, buffer, len)) < 0)
forth_perror(env, "read error '%s'", name);
- close(fd);
+ (void) close(fd);
PUSH(DS, (fstack_t)buffer);
PUSH(DS, (fstack_t)n);
}
@@ -504,18 +502,18 @@ read_line(fcode_env_t *env)
struct termio termio, savetermio;
if (!isatty(fileno(stdin))) {
- fgets(buf, sizeof (buf), stdin);
+ (void) fgets(buf, sizeof (buf), stdin);
push_string(env, buf, strlen(buf));
return;
}
printf(prompt_string);
fflush(stdout);
- ioctl(fileno(stdin), TCGETA, &termio);
+ (void) ioctl(fileno(stdin), TCGETA, &termio);
savetermio = termio;
termio.c_lflag &= ~(ICANON|ECHO|ECHOE|IEXTEN);
termio.c_cc[VTIME] = 0;
termio.c_cc[VMIN] = 1;
- ioctl(fileno(stdin), TCSETA, &termio);
+ (void) ioctl(fileno(stdin), TCSETA, &termio);
my_line = cur_line = num_lines;
save_buf[0] = '\0';
for (cursor = eol = buf; ; ) {
@@ -627,7 +625,7 @@ read_line(fcode_env_t *env)
redraw_line(env, buf, cursor, eol,
save_line, save_line + save_cursor,
save_line + len);
- strcpy(buf, save_line);
+ (void) strcpy(buf, save_line);
eol = buf + len;
cursor = buf + save_cursor;
continue;
@@ -636,7 +634,7 @@ read_line(fcode_env_t *env)
p = history_lines[cur_line];
len = strlen(p);
redraw_line(env, buf, cursor, eol, p, p, p + len);
- strcpy(buf, history_lines[cur_line]);
+ (void) strcpy(buf, history_lines[cur_line]);
cursor = buf;
eol = buf + len;
continue;
@@ -753,7 +751,7 @@ read_line(fcode_env_t *env)
break;
}
add_line_to_history(env, buf);
- ioctl(fileno(stdin), TCSETA, &savetermio);
+ (void) ioctl(fileno(stdin), TCSETA, &savetermio);
push_string(env, buf, strlen(buf));
}
@@ -763,7 +761,7 @@ set_prompt(fcode_env_t *env)
char *prompt;
if ((prompt = parse_a_string(env, NULL)) != NULL)
- strncpy(prompt_string, prompt, sizeof (prompt_string));
+ (void) strncpy(prompt_string, prompt, sizeof (prompt_string));
}
#pragma init(_init)
diff --git a/usr/src/lib/efcode/engine/log.c b/usr/src/lib/efcode/engine/log.c
index b17f38b8c4..12b7687736 100644
--- a/usr/src/lib/efcode/engine/log.c
+++ b/usr/src/lib/efcode/engine/log.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Daemon log message. This can direct log messages to either stdout,
* an error log file or syslog (or any combination).
@@ -183,22 +181,22 @@ log_message(int msg_level, char *fmt, ...)
va_start(ap, fmt);
- vsprintf(msg, fmt, ap);
+ (void) vsprintf(msg, fmt, ap);
if (log_to_stdout(msg_level)) {
printf(msg);
fflush(stdout);
}
if (log_to_error_log(msg_level)) {
- fprintf(error_log_fp, msg);
- fflush(error_log_fp);
+ (void) fprintf(error_log_fp, msg);
+ (void) fflush(error_log_fp);
}
if (log_to_syslog(msg_level)) {
if (strlen(log_msg) + strlen(msg) > LOG_LINESIZE - 1) {
syslog(msg_level_to_syslog(msg_level), log_msg);
log_msg[0] = '\0';
}
- strcat(log_msg, msg);
+ (void) strcat(log_msg, msg);
if ((p = strchr(log_msg, '\n')) != NULL) {
*p = '\0';
syslog(msg_level_to_syslog(msg_level), log_msg);
@@ -221,7 +219,7 @@ debug_msg(int debug_level, char *fmt, ...)
va_start(ap, fmt);
- vsprintf(msg, fmt, ap);
+ (void) vsprintf(msg, fmt, ap);
log_message(MSG_DEBUG, msg);
}
@@ -237,8 +235,8 @@ log_perror(int msg_level, char *fmt, ...)
va_start(ap, fmt);
- vsprintf(msg, fmt, ap);
- sprintf(tmp, "%s: %s\n", msg, strerror(errno));
+ (void) vsprintf(msg, fmt, ap);
+ (void) sprintf(tmp, "%s: %s\n", msg, strerror(errno));
log_message(msg_level, tmp);
}
@@ -333,7 +331,7 @@ set_error_log(fcode_env_t *env)
return;
}
if (error_log_fp)
- fclose(error_log_fp);
+ (void) fclose(error_log_fp);
if (error_log_name)
FREE(error_log_name);
error_log_fp = fp;
diff --git a/usr/src/lib/efcode/engine/package.c b/usr/src/lib/efcode/engine/package.c
index 54a75dfe88..2ba034c1a4 100644
--- a/usr/src/lib/efcode/engine/package.c
+++ b/usr/src/lib/efcode/engine/package.c
@@ -588,7 +588,7 @@ locate_package(fcode_env_t *env, char *start)
if ((next_p = strchr(p, ':')) != NULL)
*next_p++ = '\0';
tpath = MALLOC(strlen(p) + strlen(start) + 2);
- sprintf(tpath, "%s/%s", p, start);
+ (void) sprintf(tpath, "%s/%s", p, start);
if ((d = match_package_path(env, tpath)) != NULL) {
FREE(fpath);
FREE(tpath);
@@ -706,10 +706,10 @@ get_path(fcode_env_t *env, device_t *d)
name = get_package_name(env, d);
n = strlen(pre_path) + strlen(name) + 1;
path = MALLOC(n);
- strcpy(path, pre_path);
- strcat(path, name);
+ (void) strcpy(path, pre_path);
+ (void) strcat(path, name);
if (d->child && d->parent)
- strcat(path, "/");
+ (void) strcat(path, "/");
FREE(pre_path);
return (path);
}
diff --git a/usr/src/lib/efcode/engine/properties.c b/usr/src/lib/efcode/engine/properties.c
index ff14c1f03c..966d0f005b 100644
--- a/usr/src/lib/efcode/engine/properties.c
+++ b/usr/src/lib/efcode/engine/properties.c
@@ -24,8 +24,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -738,7 +736,7 @@ print_property(fcode_env_t *env, prop_t *p, char *prepend)
char *name = (p->name ? p->name : "<noname>");
if (prepend) {
- sprintf(buf, "%s %s", prepend, name);
+ (void) snprintf(buf, sizeof (buf), "%s %s", prepend, name);
name = buf;
}
print_indented(name);
diff --git a/usr/src/lib/efcode/engine/signal.c b/usr/src/lib/efcode/engine/signal.c
index a023bfd857..eed5c962d9 100644
--- a/usr/src/lib/efcode/engine/signal.c
+++ b/usr/src/lib/efcode/engine/signal.c
@@ -24,8 +24,6 @@
* All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -55,14 +53,14 @@ process_signal(int sig, siginfo_t *sip, void *addr)
case SIGFPE:
forth_abort(saved_envp, "%s: Fault Addr: 0x%08x",
strsignal(sig), sip->si_addr);
-
+ /* FALLTHROUGH */
case SIGQUIT:
- ioctl(fileno(stdin), TCSETA, &saved_termio);
+ (void) ioctl(fileno(stdin), TCSETA, &saved_termio);
log_message(MSG_FATAL, "SIGQUIT\n");
abort();
case SIGINT:
- ioctl(fileno(stdin), TCSETA, &saved_termio);
+ (void) ioctl(fileno(stdin), TCSETA, &saved_termio);
break;
}
forth_abort(saved_envp, strsignal(sig));
@@ -75,17 +73,17 @@ install_handlers(fcode_env_t *env)
saved_envp = env;
- ioctl(fileno(stdin), TCGETA, &saved_termio);
+ (void) ioctl(fileno(stdin), TCGETA, &saved_termio);
- sigemptyset(&sa.sa_mask);
+ (void) sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_SIGINFO|SA_NODEFER;
sa.sa_handler = 0;
sa.sa_sigaction = process_signal;
- sigaction(SIGINT, &sa, NULL);
- sigaction(SIGQUIT, &sa, NULL);
- sigaction(SIGSEGV, &sa, NULL);
- sigaction(SIGBUS, &sa, NULL);
- sigaction(SIGUSR1, &sa, NULL);
- sigaction(SIGFPE, &sa, NULL);
+ (void) sigaction(SIGINT, &sa, NULL);
+ (void) sigaction(SIGQUIT, &sa, NULL);
+ (void) sigaction(SIGSEGV, &sa, NULL);
+ (void) sigaction(SIGBUS, &sa, NULL);
+ (void) sigaction(SIGUSR1, &sa, NULL);
+ (void) sigaction(SIGFPE, &sa, NULL);
}