mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 12:05:48 +00:00
Addressing some clang warnings
This commit is contained in:
parent
4a8b71c191
commit
af373aa1cc
@ -5,4 +5,4 @@ max_textw(void)
|
|||||||
for (struct item *item = items; item && item->text; item++)
|
for (struct item *item = items; item && item->text; item++)
|
||||||
len = MAX(TEXTW(item->text), len);
|
len = MAX(TEXTW(item->text), len);
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
static void
|
static void
|
||||||
refreshoptions()
|
refreshoptions(void)
|
||||||
{
|
{
|
||||||
int dynlen = strlen(dynamic);
|
int dynlen = strlen(dynamic);
|
||||||
char* cmd= malloc(dynlen + strlen(text) + 2);
|
char* cmd= malloc(dynlen + strlen(text) + 2);
|
||||||
@ -88,4 +88,4 @@ readstream(FILE* stream)
|
|||||||
text[0] = '\0';
|
text[0] = '\0';
|
||||||
cursor = 0;
|
cursor = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
static void refreshoptions();
|
static void refreshoptions(void);
|
||||||
static void readstream(FILE* stream);
|
static void readstream(FILE* stream);
|
||||||
|
@ -112,4 +112,4 @@ fuzzymatch(void)
|
|||||||
#endif // INSTANT_PATCH
|
#endif // INSTANT_PATCH
|
||||||
|
|
||||||
calcoffsets();
|
calcoffsets();
|
||||||
}
|
}
|
||||||
|
@ -36,4 +36,4 @@ expect(char *expect, XKeyEvent *ignored)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // MULTI_SELECTION_PATCH
|
#endif // MULTI_SELECTION_PATCH
|
||||||
|
@ -32,4 +32,4 @@ arrayhas(char **list, int length, char *item) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1 @@
|
|||||||
static int arrayhas(char **list, int length, char *item);
|
static int arrayhas(char **list, int length, char *item);
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ printsel(unsigned int state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
selsel()
|
selsel(void)
|
||||||
{
|
{
|
||||||
if (!sel)
|
if (!sel)
|
||||||
return;
|
return;
|
||||||
@ -50,4 +50,4 @@ selsel()
|
|||||||
selid = realloc(selid, (selidsize + 1) * sizeof(int));
|
selid = realloc(selid, (selidsize + 1) * sizeof(int));
|
||||||
selid[selidsize - 1] = sel->id;
|
selid[selidsize - 1] = sel->id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,4 +123,4 @@ out:
|
|||||||
free(history[i]);
|
free(history[i]);
|
||||||
}
|
}
|
||||||
free(history);
|
free(history);
|
||||||
}
|
}
|
||||||
|
@ -65,4 +65,4 @@ run(void)
|
|||||||
if (FD_ISSET(0, &fds))
|
if (FD_ISSET(0, &fds))
|
||||||
readstdin();
|
readstdin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
static void readevent();
|
static void readevent();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
static char numbers[NUMBERSBUFSIZE] = "";
|
static char numbers[NUMBERSBUFSIZE] = "";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
recalculatenumbers()
|
recalculatenumbers(void)
|
||||||
{
|
{
|
||||||
unsigned int numer = 0, denom = 0;
|
unsigned int numer = 0, denom = 0;
|
||||||
struct item *item;
|
struct item *item;
|
||||||
@ -13,4 +13,4 @@ recalculatenumbers()
|
|||||||
for (item = items; item && item->text; item++)
|
for (item = items; item && item->text; item++)
|
||||||
denom++;
|
denom++;
|
||||||
snprintf(numbers, NUMBERSBUFSIZE, "%d/%d", numer, denom);
|
snprintf(numbers, NUMBERSBUFSIZE, "%d/%d", numer, denom);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define NUMBERSMAXDIGITS 100
|
#define NUMBERSMAXDIGITS 100
|
||||||
#define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1
|
#define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1
|
||||||
|
|
||||||
static void recalculatenumbers();
|
static void recalculatenumbers(void);
|
||||||
|
@ -169,4 +169,4 @@ drw_text_align(Drw *drw, int x, int y, unsigned int w, unsigned int h, const cha
|
|||||||
XftDrawDestroy(d);
|
XftDrawDestroy(d);
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
enum { AlignL, AlignR };
|
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);
|
int drw_text_align(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *text, int textlen, int align);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user