From c910282c40424a4c9a1f8533d186bed73099aede Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 23 Sep 1999 17:54:57 +0000 Subject: [PATCH] Shut up MSVC++ compiler warning about loss of precision when assigning 8 bits masked out of a 32 bit int to individual bytes. --- lib/isc/buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/isc/buffer.c b/lib/isc/buffer.c index d3155c11ad..4c12795fd9 100644 --- a/lib/isc/buffer.c +++ b/lib/isc/buffer.c @@ -378,10 +378,10 @@ isc_buffer_putuint32(isc_buffer_t *b, isc_uint32_t val) cp = b->base; cp += b->used; b->used += 4; - cp[0] = (val & 0xff000000) >> 24; - cp[1] = (val & 0x00ff0000) >> 16; - cp[2] = (val & 0x0000ff00) >> 8; - cp[3] = (val & 0x000000ff); + cp[0] = (unsigned char)((val & 0xff000000) >> 24); + cp[1] = (unsigned char)((val & 0x00ff0000) >> 16); + cp[2] = (unsigned char)((val & 0x0000ff00) >> 8); + cp[3] = (unsigned char)(val & 0x000000ff); } isc_result_t