Got it (and from the other responses also). I was not aware that I=20 could use const as a parameter type in a function. Thanks On 9/15/2018 1:53 PM, Jason White wrote: > Change the function's declared type to "const unsigned char *bitmap" > > On Saturday, September 15, 2018, Neil wrote: > >> Hi all, >> >> I've got bitmaps defined using const (to store it in program memory) in >> my PIC32 code as... >> const unsigned char Logo1Bitmap[312] =3D >> { >> 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xF0, >> 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, >> ... >> } >> >> >> I also have this function... >> void DrawBitmap(signed short XPos, signed short YPos, signed short >> width, signed short height, unsigned char *bitmap, unsigned short color)= ; >> >> >> When I pass the bitmap to the function like this... >> DrawBitmap(85, 28, 52, 42, Logo1Bitmap, 0x7BEF); >> >> >> I get warning messages like this... >> warning: passing argument 5 of 'DrawBitmap' discards 'const' qualifier >> from pointer target type [enabled by default] >> DrawBitmap(85, 28, 52, 42, Logo1Bitmap, 0x7BEF); >> >> The only way I can get the warning to go away is to do this... >> DrawBitmap(85, 28, 52, 42, (unsigned char *)&Logo1Bitmap[0], >> 0x7BEF); >> >> >> It works properly either way, but I'm unclear what it thinks I'm doing >> wrong. And what's the right way to do this? >> >> Cheers, >> -Neil. >> >> >> -- >> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .