shithub: orca

Download patch

ref: 9b81391d76eb3c2c4a14ec82b9b52b8f83875f0a
parent: b0a62b4c4e1c8cae5ab8b06663efcad2777943fb
author: cancel <cancel@cancel.fm>
date: Mon Dec 17 19:06:05 EST 2018

Change to use 'strict' void style fn decls

--- a/cli_main.c
+++ b/cli_main.c
@@ -5,7 +5,7 @@
 #include "sim.h"
 #include <getopt.h>
 
-static void usage() {
+static void usage(void) {
   // clang-format off
   fprintf(stderr,
       "Usage: cli [options] infile\n\n"
--- a/term_util.h
+++ b/term_util.h
@@ -37,7 +37,7 @@
   return COLOR_PAIR(1 + fg * Colors_count + bg);
 }
 
-void term_util_init_colors();
+void term_util_init_colors(void);
 
 typedef enum {
   Qblock_type_qmsg,
@@ -88,10 +88,10 @@
   Qmenu_action_picked picked;
 } Qmenu_action;
 
-void qnav_init();
-void qnav_deinit();
-Qblock* qnav_top_block();
-void qnav_stack_pop();
+void qnav_init(void);
+void qnav_deinit(void);
+Qblock* qnav_top_block(void);
+void qnav_stack_pop(void);
 
 void qblock_print_frame(Qblock* qb, bool active);
 void qblock_set_title(Qblock* qb, char const* title);
--- a/tool
+++ b/tool
@@ -181,7 +181,7 @@
   local libraries=()
   local source_files=()
   local out_exe
-  add cc_flags -std=c99 -pipe -finput-charset=UTF-8 -Wall -Wpedantic -Wextra -Wconversion -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion
+  add cc_flags -std=c99 -pipe -finput-charset=UTF-8 -Wall -Wpedantic -Wextra -Wconversion -Wstrict-prototypes -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion
   if [[ $lld_detected = 1 ]]; then
     add cc_flags -fuse-ld=lld
   fi
--- a/tui_main.c
+++ b/tui_main.c
@@ -13,7 +13,7 @@
 #include "sokol_time.h"
 #undef SOKOL_IMPL
 
-static void usage() {
+static void usage(void) {
   // clang-format off
   fprintf(stderr,
       "Usage: orca [options] [file]\n\n"
@@ -1495,7 +1495,7 @@
   Main_menu_about,
 };
 
-void push_main_menu() {
+void push_main_menu(void) {
   Qmenu* qm = qmenu_create(Main_menu_id);
   qmenu_add_choice(qm, "Save", Main_menu_save);
   qmenu_add_choice(qm, "Save As...", Main_menu_save_as);
@@ -1508,7 +1508,7 @@
   qblock_set_title(&qm->qblock, "ORCA");
 }
 
-void push_about_msg() {
+void push_about_msg(void) {
   // clang-format off
   static char const* logo[] = {
   "lqqqk|lqqqk|lqqqk|lqqqk",
@@ -1553,7 +1553,7 @@
   wprintw(w, footer);
 }
 
-void push_controls_msg() {
+void push_controls_msg(void) {
   struct Ctrl_item {
     char const* input;
     char const* desc;