From 8a3884a4e1b278e68ce578f281862801e1d23c67 Mon Sep 17 00:00:00 2001
From: Ho Tuan Kiet <tuankiet65@gmail.com>
Date: Fri, 29 Dec 2017 22:47:27 +0700
Subject: [PATCH 2/3] bin/pc: Mark non-returning function as void
set_var doesn't return any value yet its return type is ULONG, and Coverity freaks out about that. This patch turns that function into a void function.
Coverity CID: 603433
---
src/bin/pc/pc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bin/pc/pc.c b/src/bin/pc/pc.c
index efd90924a3..05fb9123f1 100644
a
|
b
|
ULONG term(char **str); /* multiplication/division *,%,/ */
|
134 | 134 | ULONG factor(char **str); /* negation, logical not ~, ! */ |
135 | 135 | ULONG get_value(char **str); |
136 | 136 | int get_var(char *name, ULONG *val); /* external interfaces to vars */ |
137 | | ULONG set_var(char *name, ULONG val); |
| 137 | void set_var(char *name, ULONG val); |
138 | 138 | |
139 | 139 | void do_input(void); /* reads stdin and calls parser */ |
140 | 140 | char *skipwhite(char *str); /* skip over input white space */ |
… |
… |
add_var(char *name, ULONG value)
|
1018 | 1018 | This routine and the companion get_var() are external |
1019 | 1019 | interfaces to the variable manipulation routines. |
1020 | 1020 | */ |
1021 | | ULONG |
| 1021 | void |
1022 | 1022 | set_var(char *name, ULONG val) |
1023 | 1023 | { |
1024 | 1024 | variable *v; |