avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] [bug #24888] eeprom.h not compatible with -mint8 compiler


From: Ken Krieger
Subject: [avr-libc-dev] [bug #24888] eeprom.h not compatible with -mint8 compiler switch
Date: Thu, 20 Nov 2008 07:58:07 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8

URL:
  <http://savannah.nongnu.org/bugs/?24888>

                 Summary: eeprom.h not compatible with -mint8 compiler switch
                 Project: AVR C Runtime Library
            Submitted by: kenk
            Submitted on: Thu 20 Nov 2008 07:58:06 AM GMT
                Category: Header
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Header files
                  Status: None
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.6.4
           Fixed Release: None

    _______________________________________________________

Details:


The function eeprom_write_byte() assigns the EEAR with the address passed in
through the __p parameter. This parameter is declared as a pointer type in the
function declaration, and then re-cast to "unsigned" at the assignment of it
value to the EEAR.

when using the -mint8 compiler switch, "unsigned" becomes an 8-bit type,
however, it is being assigned to a 16-bit location. The compiler throws a
warning.

This is easily fixed by changing the "unsigned" casts to the proper
"unint??_t" 

Specifically, reference lines 308-312 of eeprom.h






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?24888>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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