Skip to content

Commit cde96d6

Browse files
committed
defined void in empty function args
1 parent ab90409 commit cde96d6

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,21 @@ mkdir ./target
99

1010
cd ./target
1111

12+
set -e
13+
1214
cmake .. && make && ctest -C Release --output-on-failure
1315

1416
if [ "$1" = "--memcheck" ]; then
1517
# memory check
1618
ctest -T memcheck || true
19+
elif [ "$1" = "--valgrind" ]; then
20+
# memory check
21+
for testfile in ./bin/test_*
22+
do
23+
echo "------------------------------------------------"
24+
echo "Testing ${testfile}"
25+
valgrind --leak-check=yes --undef-value-errors=no --error-exitcode=1 "${testfile}"
26+
done
1727
fi
1828

1929
cd -

src/scriptexec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#include <unistd.h>
99

1010
// private functions
11-
static struct ScriptExecResult _scriptexec_create_result();
11+
static struct ScriptExecResult _scriptexec_create_result(void);
1212
static char *_scriptexec_read_and_delete_text_file(char *);
1313

14-
struct ScriptExecOptions scriptexec_create_options()
14+
struct ScriptExecOptions scriptexec_create_options(void)
1515
{
1616
struct ScriptExecOptions options =
1717
{
@@ -145,7 +145,7 @@ struct ScriptExecResult scriptexec_run_with_options(const char *script, struct S
145145
return(result);
146146
} /* scriptexec_run_with_options */
147147

148-
static struct ScriptExecResult _scriptexec_create_result()
148+
static struct ScriptExecResult _scriptexec_create_result(void)
149149
{
150150
struct ScriptExecResult result = { .code = 0, .out = NULL, .err = NULL };
151151

0 commit comments

Comments
 (0)