diff options
author | Aaron Lehmann | 2001-12-06 03:29:37 +0000 |
---|---|---|
committer | Aaron Lehmann | 2001-12-06 03:29:37 +0000 |
commit | 2dd2d7a37da0f292ede2f9bfe1575280a49a5106 (patch) | |
tree | 4247527c485b74ddc67f5318dad1b77cb089a6fe /miscutils/dc.c | |
parent | b9df470c4d886f03b26d9277ec059130e6472f40 (diff) | |
download | busybox-2dd2d7a37da0f292ede2f9bfe1575280a49a5106.zip busybox-2dd2d7a37da0f292ede2f9bfe1575280a49a5106.tar.gz |
Patch to avoid warnings
Diffstat (limited to 'miscutils/dc.c')
-rw-r--r-- | miscutils/dc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/miscutils/dc.c b/miscutils/dc.c index 8d7a92a..f9020b3 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -19,65 +19,65 @@ static void push(double a) stack[pointer++] = a; } -static double pop() +static double pop(void) { if (pointer == 0) error_msg_and_die("stack underflow"); return stack[--pointer]; } -static void add() +static void add(void) { push(pop() + pop()); } -static void sub() +static void sub(void) { double subtrahend = pop(); push(pop() - subtrahend); } -static void mul() +static void mul(void) { push(pop() * pop()); } -static void divide() +static void divide(void) { double divisor = pop(); push(pop() / divisor); } -static void and() +static void and(void) { push((unsigned int) pop() & (unsigned int) pop()); } -static void or() +static void or(void) { push((unsigned int) pop() | (unsigned int) pop()); } -static void eor() +static void eor(void) { push((unsigned int) pop() ^ (unsigned int) pop()); } -static void not() +static void not(void) { push(~(unsigned int) pop()); } -static void print() +static void print(void) { printf("%g\n", pop()); } struct op { const char *name; - void (*function) (); + void (*function) (void); }; static const struct op operators[] = { |