commit 2307b31887bd85173e0a31948276ddb3af567249
parent 108a3b0b41ff8f6656aae4692df6dcd65845a6c8
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 30 Sep 2019 19:01:04 +0200
tweaks: use 'void' in prototypes of parameterless functions [coverity]
Diffstat:
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/help.c b/src/help.c
@@ -40,7 +40,7 @@ static size_t location;
/* The offset (in bytes) of the topleft of the shown help text. */
/* Hard-wrap the concatenated help text, and write it into a new buffer. */
-void wrap_help_text_into_buffer()
+void wrap_help_text_into_buffer(void)
{
size_t sum = 0;
const char *ptr = start_of_body;
diff --git a/src/nano.c b/src/nano.c
@@ -243,7 +243,7 @@ void partition_buffer(linestruct *top, size_t top_x,
}
/* Unpartition the current buffer so that it is complete again. */
-void unpartition_buffer()
+void unpartition_buffer(void)
{
/* Reattach the line that was above the top of the partition. */
openfile->filetop->prev = foreline;
diff --git a/src/proto.h b/src/proto.h
@@ -334,7 +334,7 @@ char *menu_to_name(int menu);
/* All functions in help.c. */
#ifdef ENABLE_HELP
-void wrap_help_text_into_buffer();
+void wrap_help_text_into_buffer(void);
void do_help(void);
void help_init(void);
functionptrtype parse_help_input(int *kbinput);
@@ -400,7 +400,7 @@ void free_lines(linestruct *src);
void renumber_from(linestruct *line);
void partition_buffer(linestruct *top, size_t top_x,
linestruct *bot, size_t bot_x);
-void unpartition_buffer();
+void unpartition_buffer(void);
void extract(linestruct *top, size_t top_x, linestruct *bot, size_t bot_x);
void ingraft_buffer(linestruct *somebuffer);
void copy_from_buffer(linestruct *somebuffer);
@@ -469,7 +469,7 @@ int do_yesno_prompt(bool all, const char *msg);
/* Most functions in rcfile.c. */
#ifdef ENABLE_NANORC
-void display_rcfile_errors();
+void display_rcfile_errors(void);
#ifdef ENABLE_COLOR
void parse_one_include(char *file, syntaxtype *syntax);
void grab_and_store(const char *kind, char *ptr, regexlisttype **storage);
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -152,7 +152,7 @@ static linestruct *errors_tail = NULL;
/* Beginning and end of a list of errors in rcfiles, if any. */
/* Send the gathered error messages (if any) to the terminal. */
-void display_rcfile_errors()
+void display_rcfile_errors(void)
{
for (linestruct *error = errors_head; error != NULL; error = error->next)
fprintf(stderr, "%s\n", error->data);