avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Discarded Qualifiers.


From: Daniel Williamson
Subject: [avr-gcc-list] Discarded Qualifiers.
Date: Wed, 12 Mar 2003 12:15:10 -0000

Hi all,

After realising that my intermittent linking problem was caused by an array
in one source file having the same name as a function in another. I missed
the warning that the type and size had changed! (I should go back to naming
all functions with a preceeding f_ Like pointers p_ ) I'm moving on to my
next problem.

I have an array stored in flash as follows

unsigned char test_graphic[] PROGMEM = {16,16,
                0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
                0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff,
                0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
                0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xff};

whan I call a function with the following prototype
        void put_graphic(unsigned char x, unsigned char y, unsigned char *data);

using the following call
        put_graphic(0,0,test_graphic);

I get a warning message
        warning: Passing arg 3 of `put graphic' discards qualifier from pointer
target type.

Why?

The program works fine (for the moment.)

I thought that I might need to change unsigned char to PGM_VOID_P as the
pointer is to flash and not to sram.  However that comes up with an
incompatable pointer type warning.


What am I doing wrong?


Dan.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]