Hi all,

I have no clue what this warning message means, I do
know what it is about but no knowledge how to correct it :

nmea-c3.c:35: warning 196: pointer target lost const qualifier

I have searched the archives and used Google to no avail.

This is what I have, in different c and h files, that generates
the warning, the string is received in minicom :

typedef unsigned char uint8_t;

const uint8_t *software_revision = "$ITVER,NMEA-C3,10,8-6-2012\r\n";

void main(void)
{
        .....
        UART_PutString(software_revision);
        .....
}

void UART_PutString(uint8_t *string)
{
        uint8_t character;

        while(character = *string++)
        {
                UART_PutChar(character);
        }
        return;
}

void UART_PutChar(uint8_t c)
{
        // Wait for available space in buffer
        while(serial_tcnt >= serial_tbuflen)
        {
//              CpuIdle();
        }
        // Disable the UART interrupt
        es0 = false;
        if(serial_busy > 0)
        {
                // Put the character in the buffer and increase the
counter
                serial_tbuf[(serial_tpos + serial_tcnt++) %
serial_tbuflen] = c;
        }
        else
        {
                // Put the character in s0buf
                s0buf = c;
                // Indicate that the uart is busy
                serial_busy = true;
        }
        // Enable the UART interrupt
        es0 = true;
        return;
}


Compiled and linked with :

sdcc -D_89c668 -c --code-size 65536 --xram-size 2048 serial.c
sdcc -D_89v664 -c --code-size 65536 --xram-size 2048 nmea-c3.c
....
sdcc --code-size 65536 --xram-size 2048 nmea-c3.rel serial.rel ....


SDCC : mcs51 3.1.5 #7699 (May 16 2012) (Linux)


Maybe a good soul can help me a bit with this warning ?

roelof



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to