* bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
(elsz): Now a signed constant, not a size_t var. We prefer signed
types to unsigned, to avoid integer comparison confusion. Without
this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
"cannot optimize loop, the loop counter may overflow", a symptom
of the confusion.
2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
+ Fix minor problems found by static checking.
+ * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
+ (elsz): Now a signed constant, not a size_t var. We prefer signed
+ types to unsigned, to avoid integer comparison confusion. Without
+ this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
+ "cannot optimize loop, the loop counter may overflow", a symptom
+ of the confusion.
* indent.c (Fvertical_motion): Mark locals as initialized.
* xdisp.c (reseat_to_string): Fix pointer signedness issue.
#define BIDI_CACHE_CHUNK 200
static struct bidi_it *bidi_cache;
-static size_t bidi_cache_size = 0;
-static size_t elsz = sizeof (struct bidi_it);
+static EMACS_INT bidi_cache_size = 0;
+enum { elsz = sizeof (struct bidi_it) };
static EMACS_INT bidi_cache_idx; /* next unused cache slot */
static EMACS_INT bidi_cache_last_idx; /* slot of last cache hit */
static EMACS_INT bidi_cache_start = 0; /* start of cache for this