Fix warning on test main functions prototypes.

This commit is contained in:
Madeorsk 2023-02-12 16:38:21 +01:00
parent a6f65c9e5b
commit de5075571b
6 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@
#include <assert.h>
#include <string.h>
int main(/*int argc, char *argv[]*/)
int main(void)
{
// try to create arrays.
ksrarray *array_tiny = ksrarray_new_tiny();

View File

@ -1,7 +1,7 @@
#include <assert.h>
#include <ksr/buffers.h>
int main(/*int argc, char *argv[]*/)
int main(void)
{
// create an empty buffer and check that it is properly instantiated.
ksrbuffer *empty_buffer = ksrbuffer_new_empty(30);

View File

@ -2,7 +2,7 @@
#include <ksr/regex.h>
#include <ksr/string.h>
int main(/*int argc, char *argv[]*/)
int main(void)
{
// try a simple regex and check that it matches properly.
ksregex *reg1 = ksregex_new_nogroup("^[0-9]+$", 0);

View File

@ -1,7 +1,7 @@
#include <ksr/files.h>
#include <assert.h>
int main(/*int argc, char *argv[]*/)
int main(void)
{
// delete test directory if it exists.
system("rm -Rf ksrtesttesttmp");

View File

@ -14,7 +14,7 @@ void promise_execution_ok(ksrpromise *promise, void *data)
ksrpromise_resolve(promise, "OK");
}
void promise_execution_sigint(/*ksrpromise *promise, void *data*/)
void promise_execution_sigint(ksrpromise *promise, void *data)
{
// raise a signal to interrupt await.
raise(SIGINT);
@ -44,7 +44,7 @@ void on_promise_failed(int error_code, const char *error_message, void *userdata
assert(str_equals("blabla", userdata));
}
int main(/*int argc, char *argv[]*/)
int main(void)
{
// try to create a promise.
ksrpromise *promise = ksrpromise_new(promise_execution_ok, NULL);

View File

@ -2,7 +2,7 @@
#include <assert.h>
#include <ksr/buffers.h>
int main(/*int argc, char *argv[]*/)
int main(void)
{
assert(str_equals("hello", to_lowercase("heLLo")));
assert(str_equals("hello", to_lowercase("HELLO")));