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

Add missing initializer braces in stb_easy_font.h #1196

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

Conversation

musicinmybrain
Copy link

See the following compiler warning from gcc 11.2.1 with -Wall:

In file included from test_easyfont.c:1:
../stb_easy_font.h: In function 'stb_easy_font_print':
../stb_easy_font.h:205:29: warning: missing braces around initializer [-Wmissing-braces]
  205 |     stb_easy_font_color c = { 255,255,255,255 }; // use structure copying to avoid needing depending on memcpy()
      |                             ^
      |                               {               }

There should be one set of braces for the structure stb_easy_font_color, and then another to contain the elements of the array member c. This is a pedantic fix, as typical compilers will compile it correctly and will at most warn rather than erroring.

No contributors list entry is needed for this trivial contribution.

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

Successfully merging this pull request may close these issues.

2 participants