On the line, you indicate that the compiler generates a warning. Let me break your InitializeHero function.
person hero = {0,0, {0,0}};
Here you create a new person structure named hero . You use the parenthesis initialization method to set structure members. In this case, the only member of person is loc . A loc has only two uint8_t s. Using the parenthesis initialization method here, you simply use {0, 0} .
By combining these two, you can write an instruction like:
person hero = {{0, 0}};
Note that you can use parenthesis initialization during initialization. Your other two statements are appointments. The structure has already been initialized at this point, so these two statements are not compiled.
One more note: your global variable static person hero been obscured by the local hero variable in InitializeHero . This means that you are creating a separate person structure in your InitializeHero . However, this static variable is initialized where it is declared in this case, so your operator should read
static person hero = {{0, 0}};
... leave InitializeHero not used.
source share