Bug 275305 - warning "-Wdeprecated-non-prototype" breaks build a system with "WITH_OFED_EXTRA" option
Summary: warning "-Wdeprecated-non-prototype" breaks build a system with "WITH_OFED_EX...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-24 13:11 UTC by Catwoolfii
Modified: 2023-11-24 13:11 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Catwoolfii 2023-11-24 13:11:57 UTC
It looks like the default flags have changed in glang 15.
buildworld ends with the following errors:

---
/usr/src/contrib/ofed/opensm/opensm/st.c:185:11: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
st_table *st_init_table_with_size(type, size)
          ^
/usr/src/contrib/ofed/opensm/opensm/st.c:211:11: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
st_table *st_init_table(type)
          ^
/usr/src/contrib/ofed/opensm/opensm/st.c:222:11: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
st_table *st_init_numtable_with_size(size)
          ^
/usr/src/contrib/ofed/opensm/opensm/st.c:233:11: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
st_table *st_init_strtable_with_size(size)
          ^
/usr/src/contrib/ofed/opensm/opensm/st.c:239:6: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
void st_free_table(table)
     ^
/usr/src/contrib/ofed/opensm/opensm/st.c:279:5: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int st_lookup(table, key, value)
    ^
/usr/src/contrib/ofed/opensm/opensm/st.c:318:5: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int st_insert(table, key, value)
    ^
/usr/src/contrib/ofed/opensm/opensm/st.c:338:6: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
void st_add_direct(table, key, value)
     ^
/usr/src/contrib/ofed/opensm/opensm/st.c:350:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
static void rehash(table)
            ^
/usr/src/contrib/ofed/opensm/opensm/st.c:379:11: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
st_table *st_copy(old_table)
          ^
/usr/src/contrib/ofed/opensm/opensm/st.c:419:5: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int st_delete(table, key, value)
    ^
/usr/src/contrib/ofed/opensm/opensm/st.c:463:5: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int st_delete_safe(table, key, value, never)
    ^
/usr/src/contrib/ofed/opensm/opensm/st.c:502:6: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
void st_cleanup_safe(table, never)
     ^
/usr/src/contrib/ofed/opensm/opensm/st.c:512:6: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
void st_foreach(table, func, arg)
     ^
/usr/src/contrib/ofed/opensm/opensm/st.c:547:12: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
static int strhash(string)
           ^
/usr/src/contrib/ofed/opensm/opensm/st.c:581:12: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
static int numcmp(x, y)
           ^
/usr/src/contrib/ofed/opensm/opensm/st.c:587:17: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
static st_ptr_t numhash(n)
                ^
17 errors generated.
*** [st.o] Error code 1

make[5]: stopped in /usr/src/usr.bin/ofed/opensm
--- all_subdir_usr.sbin ---

make[4]: stopped in /usr/src/usr.sbin/acpi
--- all_subdir_usr.bin ---
--- all_subdir_usr.bin/clang ---

make[4]: stopped in /usr/src/usr.bin/clang
--- all_subdir_usr.sbin ---

make[3]: stopped in /usr/src/usr.sbin

make[2]: stopped in /usr/src
--- all_subdir_usr.bin ---
--- all_subdir_usr.bin/ofed ---
1 error

make[5]: stopped in /usr/src/usr.bin/ofed/opensm

make[4]: stopped in /usr/src/usr.bin/ofed

make[3]: stopped in /usr/src/usr.bin
--- all_subdir_usr.bin/clang ---
--- all_subdir_usr.bin/clang/llvm-objdump ---

make[4]: stopped in /usr/src/usr.bin/clang
--- all_subdir_usr.bin/clang/llvm-profdata ---

make[4]: stopped in /usr/src/usr.bin/clang
--- all_subdir_usr.bin/clang/llvm-readobj ---

make[4]: stopped in /usr/src/usr.bin/clang

make[3]: stopped in /usr/src/usr.bin

make[2]: stopped in /usr/src
      114.97 real      2456.39 user       196.50 sys

make[1]: stopped in /usr/src

make: stopped in /usr/src
---


If you add "-Wno-error=deprecated-non-prototype" flag, then buildworld completed successfully, but I'm not sure that this is the optimal solution.