summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2021-11-28 12:58:35 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2021-12-03 18:38:19 +0000
commit7b84a6ffa8bae2dd9fe8cb1c8bc5b0b198584d8d (patch)
treebf575e90b37cc00a85c57cee9e245b3006e89a9c
parent3ceafc3e134069ecd46df6482e8e7d4b5a7051c3 (diff)
Clear -Wsign-compare warnings from gcc
xlsfonts.c:560:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] i <= fs->max_char_or_byte2; i++, cs++) { ^~ xlsfonts.c: In function ‘print_character_metrics’: xlsfonts.c:611:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (j = info->min_byte1; j <= info->max_byte1; j++) { ^~ xlsfonts.c:613:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = info->min_char_or_byte2; i <= info->max_char_or_byte2; i++) { ^~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xlsfonts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlsfonts.c b/xlsfonts.c
index 2d8d3f2..d5163ae 100644
--- a/xlsfonts.c
+++ b/xlsfonts.c
@@ -532,7 +532,6 @@ PrintProperty(XFontProp * prop)
static void
ComputeFontType(XFontStruct *fs)
{
- int i;
Bool char_cell = True;
const char *reason = NULL;
XCharStruct *cs;
@@ -545,7 +544,7 @@ ComputeFontType(XFontStruct *fs)
}
if (awatom) {
- for (i = 0; i < fs->n_properties; i++) {
+ for (int i = 0; i < fs->n_properties; i++) {
if (fs->properties[i].name == awatom &&
(fs->max_bounds.width * 10) != fs->properties[i].card32) {
char_cell = False;
@@ -556,6 +555,7 @@ ComputeFontType(XFontStruct *fs)
}
if (fs->per_char) {
+ unsigned int i;
for (i = fs->min_char_or_byte2, cs = fs->per_char;
i <= fs->max_char_or_byte2; i++, cs++) {
if (cs->width == 0)
@@ -603,7 +603,7 @@ static void
print_character_metrics(register XFontStruct *info)
{
register XCharStruct *pc = info->per_char;
- register int i, j;
+ unsigned int i, j;
unsigned n, saven;
printf(" character metrics:\n");