Skip to content

Conversation

@yani
Copy link

@yani yani commented Jul 30, 2024

I came across this warning:

deps/astronomy/astronomy.c: In function ‘Astronomy_Constellation’:
deps/astronomy/astronomy.c:11233:5: warning: missing initializer for field ‘rot’ of ‘astro_rotation_t’ [-Wmissing-field-initializers]
11233 |     static astro_rotation_t rot = { ASTRO_NOT_INITIALIZED };
      |     ^~~~~~
In file included from deps/astronomy/astronomy.c:45:
deps/astronomy/astronomy.h:527:12: note: ‘rot’ declared here
  527 |     double rot[3][3];       /**< A normalized 3x3 rotation matrix. */
      |            ^~~

Changing line 11233 to:

static astro_rotation_t rot = { ASTRO_NOT_INITIALIZED, {{0}} };

Fixes the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant