natinusala / borealis

Hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx)
Apache License 2.0
255 stars 81 forks source link

GLFW Build on macOS - GNU old-style field designator extension warning #155

Closed EmreTech closed 3 years ago

EmreTech commented 3 years ago

Hello, so whenever I build the GLFW build of Borealis on macOS (I never got this warning in Ubuntu), I get the following repeated 50 times:

../library/include/borealis/views/button.hpp:135:5: warning: use of GNU old-style field designator extension [-Wgnu-designator]
    disabledBorderColor : "",
    ^~~~~~~~~~~~~~~~~~~~~
    .disabledBorderColor = 

Is there a way to silence it?

I'm using macOS Big Sur (11.0.1), meson 0.57.1 from brew, and the latest version of the Xcode Developer utils.

natinusala commented 3 years ago

Don't silence it, fix it 😉

Does replacing : with . work?

EmreTech commented 3 years ago

I'll try that

EmreTech commented 3 years ago

It gives a whole new error:

../library/include/borealis/views/button.hpp:55:5: error: use of undeclared identifier 'shadowType'
    shadowType . ShadowType::GENERIC,
    ^
../library/include/borealis/views/button.hpp:56:31: error: expected unqualified-id
    hideHighlightBackground . true,
                              ^
../library/include/borealis/views/button.hpp:56:5: error: use of undeclared identifier 'hideHighlightBackground'
    hideHighlightBackground . true,
    ^
EmreTech commented 3 years ago

Okay, actually, I'm going to try what the compiler suggested (since it's the compiler)

natinusala commented 3 years ago

It's not the right syntax lol, the right syntax is .member = value

EmreTech commented 3 years ago

Alright, I fixed it! I'm going to open a Pull Request shortly.

EmreTech commented 3 years ago

Fixed in #156