Verified Commit 06a3c0ab authored by Thomas E. Dickey's avatar Thomas E. Dickey
Browse files

fix warnings by gcc 11; check if length <= zero



Signed-off-by: Thomas E. Dickey's avatarThomas E. Dickey <dickey@invisible-island.net>
parent 4342ea4b
Pipeline #603724 passed with stages
in 4 minutes and 22 seconds
......@@ -548,6 +548,9 @@ XftDrawString16 (XftDraw *draw,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -576,6 +579,9 @@ XftDrawString32 (XftDraw *draw,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -607,6 +613,9 @@ XftDrawStringUtf8 (XftDraw *draw,
int l;
int size;
if (len <= 0)
return;
i = 0;
glyphs = glyphs_local;
size = NUM_LOCAL;
......@@ -652,6 +661,9 @@ XftDrawStringUtf16 (XftDraw *draw,
int l;
int size;
if (len <= 0)
return;
i = 0;
glyphs = glyphs_local;
size = NUM_LOCAL;
......@@ -755,6 +767,9 @@ XftDrawCharSpec (XftDraw *draw,
XftGlyphSpec *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -784,6 +799,9 @@ XftDrawCharFontSpec (XftDraw *draw,
XftGlyphFontSpec *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......
......@@ -123,6 +123,9 @@ XftTextExtents8 (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -151,6 +154,9 @@ XftTextExtents16 (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -179,6 +185,9 @@ XftTextExtents32 (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -210,6 +219,9 @@ XftTextExtentsUtf8 (Display *dpy,
int l;
int size;
if (len <= 0)
return;
i = 0;
glyphs = glyphs_local;
size = NUM_LOCAL;
......@@ -254,6 +266,9 @@ XftTextExtentsUtf16 (Display *dpy,
int l;
int size;
if (len <= 0)
return;
i = 0;
glyphs = glyphs_local;
size = NUM_LOCAL;
......
......@@ -362,6 +362,9 @@ XftCharSpecRender (Display *dpy,
XftGlyphSpec *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -652,6 +655,9 @@ XftCharFontSpecRender (Display *dpy,
XftGlyphFontSpec *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -689,6 +695,9 @@ XftTextRender8 (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -721,6 +730,9 @@ XftTextRender16 (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -753,6 +765,9 @@ XftTextRender16BE (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -786,6 +801,9 @@ XftTextRender16LE (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -819,6 +837,9 @@ XftTextRender32 (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -851,6 +872,9 @@ XftTextRender32BE (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -887,6 +911,9 @@ XftTextRender32LE (Display *dpy,
FT_UInt *glyphs, glyphs_local[NUM_LOCAL];
int i;
if (len <= 0)
return;
if (len <= NUM_LOCAL)
glyphs = glyphs_local;
else
......@@ -926,6 +953,9 @@ XftTextRenderUtf8 (Display *dpy,
int l;
int size;
if (len <= 0)
return;
i = 0;
glyphs = glyphs_local;
size = NUM_LOCAL;
......@@ -976,6 +1006,9 @@ XftTextRenderUtf16 (Display *dpy,
int l;
int size;
if (len <= 0)
return;
i = 0;
glyphs = glyphs_local;
size = NUM_LOCAL;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment