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

sdl: Fix warnings of string.h missing #1724

Merged
merged 1 commit into from
Dec 7, 2021
Merged

Conversation

RobLoach
Copy link
Contributor

@RobLoach RobLoach commented Dec 6, 2021

This change fixes a few implicit declaration warnings in the SDL player.

[ 97%] Building C object CMakeFiles/tic80.dir/src/system/sdl/main.c.o
src/system/sdl/main.c: In function ‘tic_sys_poll’:
src/system/sdl/main.c:1141:16: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
 1141 |             if(strlen(event.text.text) == 1)
      |                ^~~~~~
src/system/sdl/main.c:1141:16: warning: incompatible implicit declaration of built-in function ‘strlen’
src/system/sdl/main.c:1001:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
 1000 |         #include "keycodes.inl"
  +++ |+#include <string.h>
 1001 |     };
src/system/sdl/main.c: In function ‘getAppFolder’:
src/system/sdl/main.c:1301:9: warning: implicit declaration of function ‘strcpy’ [-Wimplicit-function-declaration]
 1301 |         strcpy(appFolder, path);
      |         ^~~~~~
src/system/sdl/main.c:1301:9: warning: incompatible implicit declaration of built-in function ‘strcpy’
src/system/sdl/main.c:1301:9: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’

This change fixes a few implicit declaration warnings in the SDL player.
Copy link
Owner

@nesbox nesbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@nesbox nesbox merged commit 4bda8f1 into nesbox:master Dec 7, 2021
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.

2 participants