From af373aa1cc2e97678f41ff8acd7cf7eaadc717eb Mon Sep 17 00:00:00 2001 From: bakkeby Date: Tue, 16 Jul 2024 21:42:32 +0200 Subject: [PATCH] Addressing some clang warnings --- patch/center.c | 2 +- patch/dynamicoptions.c | 4 ++-- patch/dynamicoptions.h | 4 ++-- patch/fuzzymatch.c | 2 +- patch/fzfexpect.c | 2 +- patch/highpriority.c | 2 +- patch/highpriority.h | 1 - patch/multiselect.c | 4 ++-- patch/navhistory.c | 2 +- patch/nonblockingstdin.c | 2 +- patch/nonblockingstdin.h | 2 +- patch/numbers.c | 4 ++-- patch/numbers.h | 2 +- patch/scroll.c | 2 +- patch/scroll.h | 2 +- 15 files changed, 18 insertions(+), 19 deletions(-) diff --git a/patch/center.c b/patch/center.c index 9682bfb..09b0f9a 100644 --- a/patch/center.c +++ b/patch/center.c @@ -5,4 +5,4 @@ max_textw(void) for (struct item *item = items; item && item->text; item++) len = MAX(TEXTW(item->text), len); return len; -} \ No newline at end of file +} diff --git a/patch/dynamicoptions.c b/patch/dynamicoptions.c index 0102cfb..2c942fa 100644 --- a/patch/dynamicoptions.c +++ b/patch/dynamicoptions.c @@ -1,5 +1,5 @@ static void -refreshoptions() +refreshoptions(void) { int dynlen = strlen(dynamic); char* cmd= malloc(dynlen + strlen(text) + 2); @@ -88,4 +88,4 @@ readstream(FILE* stream) text[0] = '\0'; cursor = 0; } -} \ No newline at end of file +} diff --git a/patch/dynamicoptions.h b/patch/dynamicoptions.h index eba9fb0..cf1c684 100644 --- a/patch/dynamicoptions.h +++ b/patch/dynamicoptions.h @@ -1,2 +1,2 @@ -static void refreshoptions(); -static void readstream(FILE* stream); \ No newline at end of file +static void refreshoptions(void); +static void readstream(FILE* stream); diff --git a/patch/fuzzymatch.c b/patch/fuzzymatch.c index 9407afe..459cbd0 100644 --- a/patch/fuzzymatch.c +++ b/patch/fuzzymatch.c @@ -112,4 +112,4 @@ fuzzymatch(void) #endif // INSTANT_PATCH calcoffsets(); -} \ No newline at end of file +} diff --git a/patch/fzfexpect.c b/patch/fzfexpect.c index 1563362..b497164 100644 --- a/patch/fzfexpect.c +++ b/patch/fzfexpect.c @@ -36,4 +36,4 @@ expect(char *expect, XKeyEvent *ignored) exit(1); } } -#endif // MULTI_SELECTION_PATCH \ No newline at end of file +#endif // MULTI_SELECTION_PATCH diff --git a/patch/highpriority.c b/patch/highpriority.c index 2b3577a..a8f16e7 100644 --- a/patch/highpriority.c +++ b/patch/highpriority.c @@ -32,4 +32,4 @@ arrayhas(char **list, int length, char *item) { return 1; } return 0; -} \ No newline at end of file +} diff --git a/patch/highpriority.h b/patch/highpriority.h index 8fa65bf..890763d 100644 --- a/patch/highpriority.h +++ b/patch/highpriority.h @@ -1,2 +1 @@ static int arrayhas(char **list, int length, char *item); - diff --git a/patch/multiselect.c b/patch/multiselect.c index ad78db3..aa74be2 100644 --- a/patch/multiselect.c +++ b/patch/multiselect.c @@ -32,7 +32,7 @@ printsel(unsigned int state) } static void -selsel() +selsel(void) { if (!sel) return; @@ -50,4 +50,4 @@ selsel() selid = realloc(selid, (selidsize + 1) * sizeof(int)); selid[selidsize - 1] = sel->id; } -} \ No newline at end of file +} diff --git a/patch/navhistory.c b/patch/navhistory.c index 7d10ee4..4efc7d0 100644 --- a/patch/navhistory.c +++ b/patch/navhistory.c @@ -123,4 +123,4 @@ out: free(history[i]); } free(history); -} \ No newline at end of file +} diff --git a/patch/nonblockingstdin.c b/patch/nonblockingstdin.c index eb7013f..e504ef4 100644 --- a/patch/nonblockingstdin.c +++ b/patch/nonblockingstdin.c @@ -65,4 +65,4 @@ run(void) if (FD_ISSET(0, &fds)) readstdin(); } -} \ No newline at end of file +} diff --git a/patch/nonblockingstdin.h b/patch/nonblockingstdin.h index a0c4dfe..828d1ec 100644 --- a/patch/nonblockingstdin.h +++ b/patch/nonblockingstdin.h @@ -1 +1 @@ -static void readevent(); \ No newline at end of file +static void readevent(); diff --git a/patch/numbers.c b/patch/numbers.c index 9f9557a..ed220bd 100644 --- a/patch/numbers.c +++ b/patch/numbers.c @@ -1,7 +1,7 @@ static char numbers[NUMBERSBUFSIZE] = ""; static void -recalculatenumbers() +recalculatenumbers(void) { unsigned int numer = 0, denom = 0; struct item *item; @@ -13,4 +13,4 @@ recalculatenumbers() for (item = items; item && item->text; item++) denom++; snprintf(numbers, NUMBERSBUFSIZE, "%d/%d", numer, denom); -} \ No newline at end of file +} diff --git a/patch/numbers.h b/patch/numbers.h index 34d3dbc..c739872 100644 --- a/patch/numbers.h +++ b/patch/numbers.h @@ -1,4 +1,4 @@ #define NUMBERSMAXDIGITS 100 #define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1 -static void recalculatenumbers(); \ No newline at end of file +static void recalculatenumbers(void); diff --git a/patch/scroll.c b/patch/scroll.c index 3a8d2d8..a039579 100644 --- a/patch/scroll.c +++ b/patch/scroll.c @@ -169,4 +169,4 @@ drw_text_align(Drw *drw, int x, int y, unsigned int w, unsigned int h, const cha XftDrawDestroy(d); return x; -} \ No newline at end of file +} diff --git a/patch/scroll.h b/patch/scroll.h index 927df9a..2d0c494 100644 --- a/patch/scroll.h +++ b/patch/scroll.h @@ -1,3 +1,3 @@ enum { AlignL, AlignR }; -int drw_text_align(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *text, int textlen, int align); \ No newline at end of file +int drw_text_align(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *text, int textlen, int align);