From bba748811cff13b7e7e87aa02ee2ce9cbf9e94e3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 18 Jul 2021 22:33:20 +0000 Subject: [PATCH] fixing various warnings --- config.h | 5 ++++- miketron.c | 4 +--- redsquare.c | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.h b/config.h index 0029236..feaa5c2 100644 --- a/config.h +++ b/config.h @@ -1,5 +1,6 @@ //for easier access - +#ifndef CONFIG_H +#define CONFIG_H //the default scorefiles #ifndef SCORES_DIR #ifdef Plan9 @@ -54,3 +55,5 @@ typedef signed char byte; #ifndef M_PI //i don't know why tf, but it happens #define M_PI 3.1415 #endif + +#endif //CONFIG_H diff --git a/miketron.c b/miketron.c index 635ab32..37f83d8 100644 --- a/miketron.c +++ b/miketron.c @@ -355,9 +355,7 @@ int main(int argc, char** argv){ #endif srand(time(NULL)%UINT_MAX); byte board[len][wid]; - int prex,prey; bool halfspeed=0; - const int constant=150*(80*24)/(len*wid);//that is added to score initscr(); noecho(); cbreak(); @@ -388,7 +386,7 @@ int main(int argc, char** argv){ memset(board,0,len*wid); put_stuff(board,20); - int preinput,input; + int preinput=0,input=0; while(1){ erase(); logo(); diff --git a/redsquare.c b/redsquare.c index 106c81c..41557e0 100644 --- a/redsquare.c +++ b/redsquare.c @@ -471,7 +471,6 @@ int main(void){ } byte board[RLEN][RWID]; memset(board,0,RLEN*RWID); - char result[70]; int input=0; int prey,prex; int cinred;