module api: get rid of typedef redefinitions
Technically C99 forbids it. Clang complains about typedef redefinitions when C99 is used (it is default prior to clang 3.6): | error: redefinition of typedef 'box_tuple_t' is a C11 feature | [-Werror,-Wtypedef-redefinition] | error: redefinition of typedef 'box_key_def_t' is a C11 feature | [-Werror,-Wtypedef-redefinition] The generated module.h file should define a type using typedef once. This patch moves extra definitions out of public parts of header files. Reordered api headers to place usages of such types after definitions. Set C99 for the module API test in order to catch problems of this kind in a future. Fixed 'unused value' warnings, which appears after the change (it is strange that -Wall was not passed here before). Part of #5273 Fixes #5313
Showing
- src/CMakeLists.txt 1 addition, 1 deletionsrc/CMakeLists.txt
- src/box/index.h 3 additions, 2 deletionssrc/box/index.h
- src/box/key_def.h 2 additions, 1 deletionsrc/box/key_def.h
- test/app-tap/CMakeLists.txt 6 additions, 0 deletionstest/app-tap/CMakeLists.txt
- test/app-tap/module_api.c 2 additions, 0 deletionstest/app-tap/module_api.c
Loading
Please register or sign in to comment