From bfd1c7811d3661512b382906334ac959d332735b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 17 Apr 2011 21:13:51 -0700 Subject: [PATCH] * alloc.c (string_overrun_cookie): Now const. Use initializers that don't formally overflow signed char, to avoid warnings. --- src/ChangeLog | 2 ++ src/alloc.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.39.2