aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-08-30 17:06:59 +0300
committerEli Zaretskii2014-08-30 17:06:59 +0300
commit2fca7ae050c62d572d050b377c289091ff7f0547 (patch)
tree3ab196314bed693ff647a90ecbf12efb337edc56 /src
parent23dbf47d06b396f08a530c91c456510d8dac1126 (diff)
downloademacs-2fca7ae050c62d572d050b377c289091ff7f0547.tar.gz
emacs-2fca7ae050c62d572d050b377c289091ff7f0547.zip
Fixed problems revealed by -Wall.
Diffstat (limited to 'src')
-rw-r--r--src/bidi.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/bidi.c b/src/bidi.c
index f3b4a0847d8..cb86b20b38e 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -424,22 +424,22 @@ static void
424bidi_push_embedding_level (struct bidi_it *bidi_it, 424bidi_push_embedding_level (struct bidi_it *bidi_it,
425 int level, bidi_dir_t override, bool isolate_status) 425 int level, bidi_dir_t override, bool isolate_status)
426{ 426{
427 struct bidi_stack st; 427 struct bidi_stack *st;
428 428
429 bidi_it->stack_idx++; 429 bidi_it->stack_idx++;
430 eassert (bidi_it->stack_idx < BIDI_MAXDEPTH+2+1); 430 eassert (bidi_it->stack_idx < BIDI_MAXDEPTH+2+1);
431 st = bidi_it->level_stack[bidi_it->stack_idx]; 431 st = &bidi_it->level_stack[bidi_it->stack_idx];
432 st.level = level; 432 st->level = level;
433 st.override = override; 433 st->override = override;
434 st.isolate_status = isolate_status; 434 st->isolate_status = isolate_status;
435 if (isolate_status) 435 if (isolate_status)
436 { 436 {
437 st.prev = bidi_it->prev; 437 st->prev = bidi_it->prev;
438 st.last_strong = bidi_it->last_strong; 438 st->last_strong = bidi_it->last_strong;
439 st.prev_for_neutral = bidi_it->prev_for_neutral; 439 st->prev_for_neutral = bidi_it->prev_for_neutral;
440 st.next_for_neutral = bidi_it->next_for_neutral; 440 st->next_for_neutral = bidi_it->next_for_neutral;
441 st.next_for_ws = bidi_it->next_for_ws; 441 st->next_for_ws = bidi_it->next_for_ws;
442 st.sos = bidi_it->sos; 442 st->sos = bidi_it->sos;
443 } 443 }
444} 444}
445 445
@@ -1446,7 +1446,6 @@ find_first_strong_char (ptrdiff_t pos, ptrdiff_t bytepos, ptrdiff_t end,
1446{ 1446{
1447 ptrdiff_t pos1; 1447 ptrdiff_t pos1;
1448 bidi_type_t type; 1448 bidi_type_t type;
1449 const unsigned char *s;
1450 int ch; 1449 int ch;
1451 1450
1452 if (stop_at_pdi) 1451 if (stop_at_pdi)
@@ -1543,7 +1542,6 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, bool no_default_p)
1543 } 1542 }
1544 else if (dir == NEUTRAL_DIR) /* P2 */ 1543 else if (dir == NEUTRAL_DIR) /* P2 */
1545 { 1544 {
1546 int ch;
1547 ptrdiff_t ch_len, nchars; 1545 ptrdiff_t ch_len, nchars;
1548 ptrdiff_t pos, disp_pos = -1; 1546 ptrdiff_t pos, disp_pos = -1;
1549 int disp_prop = 0; 1547 int disp_prop = 0;
@@ -1592,8 +1590,6 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, bool no_default_p)
1592 /* The following loop is run more than once only if NO_DEFAULT_P, 1590 /* The following loop is run more than once only if NO_DEFAULT_P,
1593 and only if we are iterating on a buffer. */ 1591 and only if we are iterating on a buffer. */
1594 do { 1592 do {
1595 ptrdiff_t pos1;
1596
1597 bytepos = pstartbyte; 1593 bytepos = pstartbyte;
1598 if (!string_p) 1594 if (!string_p)
1599 pos = BYTE_TO_CHAR (bytepos); 1595 pos = BYTE_TO_CHAR (bytepos);
@@ -1845,7 +1841,7 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it)
1845 goto fsi_as_lri; 1841 goto fsi_as_lri;
1846 } 1842 }
1847 else 1843 else
1848 type == RLI; 1844 type = RLI;
1849 /* FALLTHROUGH */ 1845 /* FALLTHROUGH */
1850 case RLI: /* X5a */ 1846 case RLI: /* X5a */
1851 if (override == NEUTRAL_DIR) 1847 if (override == NEUTRAL_DIR)