300
300
 
301
301
 
    /* check args */
302
302
 
    HDassert(f);
303
303
 
    HDassert(mesg);
304
304
 
    HDassert(p);
305
305
 
306
306
 
    /* Message version */
307
307
 
    *p++ = (uint8_t)H5O_LAYOUT_VERSION_3;
308
308
 
309
309
 
    /* Layout class */
310
 
-
    *p++ = mesg->type;
 
310
+
    *p++ = (uint8_t)mesg->type;
311
311
 
312
312
 
    /* Write out layout class specific information */
313
313
 
    switch(mesg->type) {
314
314
 
        case H5D_COMPACT:
315
315
 
            /* Size of raw data */
316
316
 
            UINT16ENCODE(p, mesg->storage.u.compact.size);
317
317
 
318
318
 
            /* Raw data */
319
319
 
            if(mesg->storage.u.compact.size > 0) {
320
320
 
                if(mesg->storage.u.compact.buf)