fix small warnings gcc will spit out if features have been disabled

This commit is contained in:
speedie 2023-03-09 17:26:56 +01:00
parent 416ce0cf08
commit 705cb460bf
3 changed files with 15 additions and 4 deletions

View file

@ -150,7 +150,9 @@ drawmenu(void)
unsigned int curpos = 0;
struct item *item;
int x = 0, y = 0, fh = drw->font->h, w;
#if USEIMAGE
int ox = 0;
#endif
char *censort;
drw_setscheme(drw, scheme[SchemeMenu]);
@ -170,7 +172,9 @@ drawmenu(void)
drw_setscheme(drw, scheme[SchemePrompt]);
}
#if USEIMAGE
ox = x;
#endif
x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0, pango_prompt ? True : False);
}
/* draw input field */

View file

@ -244,7 +244,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
{
char buf[1024];
int ty;
unsigned int ew;
unsigned int ew = 0;
XftDraw *d = NULL;
Fnt *usedfont, *curfont, *nextfont;
size_t i, len;

View file

@ -157,13 +157,15 @@ static int screen;
static int managed = 0;
/* image globals */
#if USEIMAGE
static int flip = 0;
static int rotation = 0;
static int needredraw = 1;
#endif
static int longestedge = 0;
static int imagew = 0;
static int imageh = 0;
static int imageg = 0;
static int longestedge = 0;
static int needredraw = 1;
/* set an integer if to 1 if we have right to left language support enabled
* doing it this way, because we can reduce the amount of #if and #else lines used.
@ -759,8 +761,10 @@ readstdin(void)
char buf[sizeof text], *p;
size_t i, imax = 0, itemsiz = 0;
unsigned int tmpmax = 0;
#if USEIMAGE
int w, h;
char *limg = NULL;
#endif
if (passwd){
inputw = lines = 0;
@ -846,7 +850,10 @@ readstdin(void)
void
setup(void)
{
int x, y, i, j, di;
int x, y, i;
#if USEXINERAMA
int j, di;
#endif
unsigned int du;
unsigned int tmp, minstrlen = 0, curstrlen = 0;
int numwidthchecks = 100;