avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] [bug #54387] minor compiler warnings


From: Dave Braun
Subject: [avrdude-dev] [bug #54387] minor compiler warnings
Date: Thu, 26 Jul 2018 09:52:57 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

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

                 Summary: minor compiler warnings
                 Project: AVR Downloader/UploaDEr
            Submitted by: sk8nfool
            Submitted on: Thu 26 Jul 2018 01:52:55 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: sk8nfool
        Originator Email: 
             Open/Closed: Open
                 Release: 6.3
         Discussion Lock: Any
     Programmer hardware: N/A
             Device type: N/A

    _______________________________________________________

Details:

Compiling version 6.3 from source on Ubuntu 18.04 reports a redefinition
warning that seems to be currently benign but may cause problems in the
future. The error is

gcc -DHAVE_CONFIG_H -I. -I..  -DCONFIG_DIR=\"/home/braun/loca/etc\"  -Wall
-Wno-pointer-sign -g -O2 -MT libavrdude_a-fileio.o -MD -MP -MF
.deps/libavrdude_a-fileio.Tpo -c -o libavrdude_a-fileio.o `test -f 'fileio.c'
|| echo '../'`fileio.c
../fileio.c:37:0: warning: "EM_AVR32" redefined
 #define EM_AVR32 0x18ad         /* inofficial */
 
In file included from /usr/include/libelf.h:36:0,
                 from ../fileio.c:33:
/usr/include/elf.h:323:0: note: this is the location of the previous
definition
 #define EM_AVR32 185 /* Amtel 32-bit microprocessor */
 
At least a comment should be added explaining why the redefinition is needed.
If the intent was to actually redefine the constant a "#undef" should precede
the redefinition.

A second warning occurs stating that misleading indentation is present. The
warning is

gcc -DHAVE_CONFIG_H -I. -I..  -DCONFIG_DIR=\"/home/braun/local/etc\"  -Wall
-Wno-pointer-sign -g -O2 -MT libavrdude
_a-avr.o -MD -MP -MF .deps/libavrdude_a-avr.Tpo -c -o libavrdude_a-avr.o `test
-f 'avr.c' || echo '../'`avr.c
../avr.c: In function ‘avr_tpi_chip_erase’:
../avr.c:83:5: warning: this ‘while’ clause does not guard...
[-Wmisleading-indentation]
     while (avr_tpi_poll_nvmbsy(pgm));
     ^~~~~
../avr.c:85:3: note: ...this statement, but the latter is misleadingly
indented as if it were guarded by the ‘while
’
   err = pgm->cmd_tpi(pgm, cmd, sizeof(cmd), NULL, 0);
   ^~~

BTW - I created a ./build directory in which I performed the build steps.





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 26 Jul 2018 01:52:55 PM UTC  Name: excerpt.log  Size: 1KiB   By:
sk8nfool
Excerpt form outut of &quot;make&quot;
<http://savannah.nongnu.org/bugs/download.php?file_id=44628>

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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