brummer10 / XUiDesigner

A WYSIWYG LV2 GUI/plugin creator tool
BSD Zero Clause License
100 stars 3 forks source link

Clang warning: Duplicate 'extern' declaration specifier #5

Closed sjaehn closed 2 years ago

sjaehn commented 2 years ago

Hi, a minor thing. The Clang linter warns about double extern in the generated source code files:

Duplicate 'extern' declaration specifier clang(-Wduplicate-decl-specifier)
macro LV2_SYMBOL_EXPORT
#define LV2_SYMBOL_EXPORT                                                      \
  LV2_SYMBOL_EXTERN __attribute__((visibility("default")))

... and it is right as LV2_SYMBOL_EXTERN is nothing else than extern "C". So you needn't / shouldn't to put extern "C" in front of LV2_SYMBOL_EXPORT.

I found it in: https://github.com/brummer10/XUiDesigner/blob/main/XUiDesigner/XUiWritePlugin.c#600

PS: I recently tapped into the same trap. PPS: It's fun to play with your tool. Helps a lot :-).

brummer10 commented 2 years ago

Hi Thanks for the hint. Indeed, LV2_SYMBOL_EXTERN already include the extern "C" definition. I've removed that now from the generator.

Nice to hear that it makes some fun. regards hermann