I'm trying to fix all warnings in a source code I've taken over from somebody else. In the code there is a function inside which the following field is initialized:
struct Elf32_SymbolQuery query2[] = { { ELF32_SQ_BYNAME, "EditEncoderProfile", 0, 0, FALSE, 0, 0 }, { ELF32_SQ_BYNAME, "EncoderControl", 0, 0, FALSE, 0, 0 }, };
The bit of code above produces two warnings:
1. missing braces around initializer
2. near initialization for 'query2[0].Sym'
What is actually wrong here, and how do I best get rid of the warnings?
Based on the documentation found here, I'd say that the problem is the last element in struct Elf32_SymbolQuery:
AFAIK, Elf32_Sym is a typedef for another structure.
Hans
Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work
As Hans said Elf32_Sym is another structure so you should change your code to:
@Hans & salass00
Thank you very much!
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2