Re: [MacPorts] #70743: py27-distorm build error: error: ‘for’ loop initial declaration used outside C99 mode

MacPorts noreply at macports.org
Mon Sep 16 06:50:10 UTC 2024


#70743: py27-distorm build error: error: ‘for’ loop initial declaration used
outside C99 mode
---------------------------------------+--------------------
  Reporter:  barracuda156              |      Owner:  (none)
      Type:  defect                    |     Status:  new
  Priority:  Normal                    |  Milestone:
 Component:  ports                     |    Version:  2.10.1
Resolution:                            |   Keywords:
      Port:  py-distorm, py27-distorm  |
---------------------------------------+--------------------

Comment (by barracuda156):

 With gcc14 fails differently:
 {{{
 src/textdefs.c: In function 'str_hex':
 src/textdefs.c:45:43: warning: pointer targets in passing argument 1 of
 'RSHORT' differ in signedness [-Wpointer-sign]
    45 |                 RSHORT(&s->p[i]) = RSHORT(&TextBTable[(*buf) *
 2]);
       |                                           ^~~~~~~~~~~~~~~~~~~~~~~
       |                                           |
       |                                           char *
 In file included from src/textdefs.h:15,
                  from src/textdefs.c:12:
 src/config.h:143:45: note: expected 'const uint8_t *' {aka 'const unsigned
 char *'} but argument is of type 'char *'
   143 | STATIC_INLINE int16_t RSHORT(const uint8_t *s)
       |                              ~~~~~~~~~~~~~~~^
 src/textdefs.c:45:34: error: lvalue required as left operand of assignment
    45 |                 RSHORT(&s->p[i]) = RSHORT(&TextBTable[(*buf) *
 2]);
       |                                  ^

 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/70743#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list