From: Paul Eggert Date: Mon, 18 Apr 2011 04:13:51 +0000 (-0700) Subject: * alloc.c (string_overrun_cookie): Now const. Use initializers that X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~259 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bfd1c7811d3661512b382906334ac959d332735b;p=emacs.git * alloc.c (string_overrun_cookie): Now const. Use initializers that don't formally overflow signed char, to avoid warnings. --- diff --git a/src/ChangeLog b/src/ChangeLog index 51e379c1280..d51052f0e3d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks". This doesn't fix a bug but makes the code clearer. + (string_overrun_cookie): Now const. Use initializers that + don't formally overflow signed char, to avoid warnings. 2011-04-17 Chong Yidong diff --git a/src/alloc.c b/src/alloc.c index 8e0cf5d43e1..2029383dec8 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1628,8 +1628,8 @@ static EMACS_INT total_string_size; presence of this cookie during GC. */ #define GC_STRING_OVERRUN_COOKIE_SIZE 4 -static char string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] = - { 0xde, 0xad, 0xbe, 0xef }; +static char const string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] = + { '\xde', '\xad', '\xbe', '\xef' }; #else #define GC_STRING_OVERRUN_COOKIE_SIZE 0