mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
* lisp.h (lint_assume): New macro.
* composite.c (composition_gstring_put_cache): * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
This commit is contained in:
parent
e1528d010f
commit
f2ed8a7095
4 changed files with 17 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
|||
2011-06-18 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* lisp.h (lint_assume): New macro.
|
||||
* composite.c (composition_gstring_put_cache):
|
||||
* ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
|
||||
|
||||
* editfns.c: Omit unnecessary forward decls, to simplify future changes.
|
||||
|
||||
* ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
|
||||
|
|
|
|||
|
|
@ -680,6 +680,7 @@ composition_gstring_put_cache (Lisp_Object gstring, EMACS_INT len)
|
|||
len = j;
|
||||
}
|
||||
|
||||
lint_assume (len <= TYPE_MAXIMUM (EMACS_INT) - 2);
|
||||
copy = Fmake_vector (make_number (len + 2), Qnil);
|
||||
LGSTRING_SET_HEADER (copy, Fcopy_sequence (header));
|
||||
for (i = 0; i < len; i++)
|
||||
|
|
|
|||
|
|
@ -2412,7 +2412,10 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font,
|
|||
if (CHAR_VARIATION_SELECTOR_P (c))
|
||||
with_variation_selector++;
|
||||
}
|
||||
|
||||
len = i;
|
||||
lint_assume (len <= TYPE_MAXIMUM (EMACS_INT) - 2);
|
||||
|
||||
if (with_variation_selector)
|
||||
{
|
||||
setup_otf_gstring (len);
|
||||
|
|
|
|||
10
src/lisp.h
10
src/lisp.h
|
|
@ -3608,11 +3608,19 @@ extern void init_system_name (void);
|
|||
? 0 \
|
||||
: (wrong_type_argument (Qlistp, (list))), 1))
|
||||
|
||||
/* Use this to suppress gcc's `...may be used before initialized' warnings. */
|
||||
/* Use this to suppress gcc's warnings. */
|
||||
#ifdef lint
|
||||
|
||||
/* Use CODE only if lint checking is in effect. */
|
||||
# define IF_LINT(Code) Code
|
||||
|
||||
/* Assume that the expression COND is true. This differs in intent
|
||||
from 'assert', as it is a message from the programmer to the compiler. */
|
||||
# define lint_assume(cond) ((cond) ? (void) 0 : abort ())
|
||||
|
||||
#else
|
||||
# define IF_LINT(Code) /* empty */
|
||||
# define lint_assume(cond) ((void) (0 && (cond)))
|
||||
#endif
|
||||
|
||||
/* The ubiquitous min and max macros. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue