[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105217: Merge: Fix minor problems fo
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105217: Merge: Fix minor problems found by static checking. |
Date: |
Thu, 14 Jul 2011 14:45:06 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105217 [merge]
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Thu 2011-07-14 14:45:06 -0700
message:
Merge: Fix minor problems found by static checking.
modified:
src/ChangeLog
src/bidi.c
src/indent.c
src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-07-14 20:08:05 +0000
+++ b/src/ChangeLog 2011-07-14 21:43:31 +0000
@@ -1,3 +1,15 @@
+2011-07-14 Paul Eggert <address@hidden>
+
+ 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.
+
2011-07-14 Lars Magne Ingebrigtsen <address@hidden>
* data.c (Fcdr, Fcar): Revert the last change, since it didn't
=== modified file 'src/bidi.c'
--- a/src/bidi.c 2011-07-14 17:43:50 +0000
+++ b/src/bidi.c 2011-07-14 21:43:31 +0000
@@ -299,8 +299,8 @@
#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
=== modified file 'src/indent.c'
--- a/src/indent.c 2011-07-14 17:28:42 +0000
+++ b/src/indent.c 2011-07-14 21:35:23 +0000
@@ -1985,7 +1985,7 @@
struct text_pos pt;
struct window *w;
Lisp_Object old_buffer;
- EMACS_INT old_charpos, old_bytepos;
+ EMACS_INT old_charpos IF_LINT (= 0), old_bytepos IF_LINT (= 0);
struct gcpro gcpro1, gcpro2, gcpro3;
Lisp_Object lcols = Qnil;
double cols IF_LINT (= 0);
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2011-07-14 17:28:42 +0000
+++ b/src/xdisp.c 2011-07-14 21:34:18 +0000
@@ -5890,7 +5890,7 @@
if (it->bidi_p)
{
it->bidi_it.string.lstring = Qnil;
- it->bidi_it.string.s = s;
+ it->bidi_it.string.s = (const unsigned char *) s;
it->bidi_it.string.schars = it->end_charpos;
it->bidi_it.string.bufpos = 0;
it->bidi_it.string.from_disp_str = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105217: Merge: Fix minor problems found by static checking.,
Paul Eggert <=