Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing initializer 'rot' warning #356

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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