Thanks to visit codestin.com
Credit goes to github.com

Skip to content

enumerator value is not an integer constant #13

@ZeroChaos-

Description

@ZeroChaos-

Attempting to build 23.11.00 on Gentoo Linux with GCC 13

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib/include -I../../../src/libfwtsiasl -I../../../src/acpica/source/include -I../../../src/acpica/source/compiler -DDATAROOTDIR=\"/usr/share\" -Wall -Wextra -Wno-address-of-packed-member -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DACPI_DEBUG_OUTPUT -c fwts_firmware.c  -fPIC -DPIC -o .libs/libfwts_la-fwts_firmware.o
In file included from ../../../src/lib/include/fwts_binpaths.h:27,
                 from ../../../src/lib/include/fwts.h:163,
                 from fwts_firmware.c:24:
fwts_firmware.c: In function 'fwts_firmware_feature_string':
../../../src/lib/include/fwts_framework.h:264:27: error: enumerator value for 'FWTS_ASSERT_str_too_small_in_line_93' is not an integer constant
  264 | enum { FWTS_CONCAT_EXPAND(FWTS_ASSERT_ ## m ## _in_line_, __LINE__) = 1 / !!(e) }
      |                           ^~~~~~~~~~~~
../../../src/lib/include/fwts_framework.h:261:27: note: in definition of macro 'FWTS_CONCAT'
  261 | #define FWTS_CONCAT(a, b) a ## b
      |                           ^
../../../src/lib/include/fwts_framework.h:264:8: note: in expansion of macro 'FWTS_CONCAT_EXPAND'
  264 | enum { FWTS_CONCAT_EXPAND(FWTS_ASSERT_ ## m ## _in_line_, __LINE__) = 1 / !!(e) }
      |        ^~~~~~~~~~~~~~~~~~
fwts_firmware.c:93:9: note: in expansion of macro 'FWTS_ASSERT'
   93 |         FWTS_ASSERT((n * (sizeof(feature_names[0].name) - 1)) +
      |         ^~~~~~~~~~~
../../../src/lib/include/fwts_framework.h:264:27: error: enumerator value for 'FWTS_ASSERT_invalid_feature_names_in_line_98' is not an integer constant
  264 | enum { FWTS_CONCAT_EXPAND(FWTS_ASSERT_ ## m ## _in_line_, __LINE__) = 1 / !!(e) }
      |                           ^~~~~~~~~~~~
../../../src/lib/include/fwts_framework.h:261:27: note: in definition of macro 'FWTS_CONCAT'
  261 | #define FWTS_CONCAT(a, b) a ## b
      |                           ^
../../../src/lib/include/fwts_framework.h:264:8: note: in expansion of macro 'FWTS_CONCAT_EXPAND'
  264 | enum { FWTS_CONCAT_EXPAND(FWTS_ASSERT_ ## m ## _in_line_, __LINE__) = 1 / !!(e) }
      |        ^~~~~~~~~~~~~~~~~~
fwts_firmware.c:98:9: note: in expansion of macro 'FWTS_ASSERT'
   98 |         FWTS_ASSERT(((1UL << n) - 1) == FWTS_FW_FEATURE_ALL,
      |         ^~~~~~~~~~~
make[4]: *** [Makefile:928: libfwts_la-fwts_firmware.lo] Error 1
make[4]: Leaving directory '/var/tmp/portage/sys-apps/fwts-23.11.00/work/fwts-23.11.00/src/lib/src'
make[3]: *** [Makefile:380: all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/sys-apps/fwts-23.11.00/work/fwts-23.11.00/src/lib'
make[2]: *** [Makefile:5141: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-apps/fwts-23.11.00/work/fwts-23.11.00/src'
make[1]: *** [Makefile:830: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-apps/fwts-23.11.00/work/fwts-23.11.00'
make: *** [Makefile:761: all] Error 2

I trimmed the log down to the failing line, but I can provide more if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions