diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-10-16 10:58:05 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-10-16 10:58:05 -0700 |
commit | 122fa8689837bc5a5166432609f351c200a17ef6 (patch) | |
tree | 06b214c2bbfbd1eccb33659556025bf3168af243 /grid.c | |
parent | da378df9565f7a8e1e086d1676c6742a5ca9d5f4 (diff) |
Variable scope reductions as recommended by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'grid.c')
-rw-r--r-- | grid.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -169,10 +169,9 @@ GridFirstChar (Widget w) FcChar32 map[FC_CHARSET_MAP_SIZE]; FcChar32 next; FcChar32 first; - int i; first = FcCharSetFirstPage (xft->charset, map, &next); - for (i = 0; i < FC_CHARSET_MAP_SIZE; i++) + for (int i = 0; i < FC_CHARSET_MAP_SIZE; i++) if (map[i]) { FcChar32 bits = map[i]; @@ -207,12 +206,12 @@ GridLastChar (Widget w) { FcChar32 this, last, next; FcChar32 map[FC_CHARSET_MAP_SIZE]; - int i; + last = FcCharSetFirstPage (xft->charset, map, &next); while ((this = FcCharSetNextPage (xft->charset, map, &next)) != FC_CHARSET_DONE) last = this; last &= ~0xff; - for (i = FC_CHARSET_MAP_SIZE - 1; i >= 0; i--) + for (int i = FC_CHARSET_MAP_SIZE - 1; i >= 0; i--) if (map[i]) { FcChar32 bits = map[i]; |