From 2aed94cfc21aeb9dc0371964485866aab4384671 Mon Sep 17 00:00:00 2001 From: aiafrasinei Date: Tue, 27 Feb 2024 23:15:09 +0200 Subject: [PATCH] Fix examples warnings for macos (#3842) --- examples/models/models_first_person_maze.c | 1 - examples/others/raylib_opengl_interop.c | 1 + examples/text/text_codepoints_loading.c | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/models/models_first_person_maze.c b/examples/models/models_first_person_maze.c index 80a2c88e..b1af7d47 100644 --- a/examples/models/models_first_person_maze.c +++ b/examples/models/models_first_person_maze.c @@ -34,7 +34,6 @@ int main(void) camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) camera.fovy = 45.0f; // Camera field-of-view Y camera.projection = CAMERA_PERSPECTIVE; // Camera projection type - Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position Image imMap = LoadImage("resources/cubicmap.png"); // Load cubicmap image (RAM) Texture2D cubicmap = LoadTextureFromImage(imMap); // Convert image to texture to display (VRAM) diff --git a/examples/others/raylib_opengl_interop.c b/examples/others/raylib_opengl_interop.c index c1b58d67..b0b7d6ff 100644 --- a/examples/others/raylib_opengl_interop.c +++ b/examples/others/raylib_opengl_interop.c @@ -35,6 +35,7 @@ #define GLSL_VERSION 100 #else #if defined(__APPLE__) + #define GL_SILENCE_DEPRECATION // Silence Opengl API deprecation warnings #include // OpenGL 3 library for OSX #include // OpenGL 3 extensions library for OSX #else diff --git a/examples/text/text_codepoints_loading.c b/examples/text/text_codepoints_loading.c index 04df96e5..c69803c1 100644 --- a/examples/text/text_codepoints_loading.c +++ b/examples/text/text_codepoints_loading.c @@ -60,7 +60,6 @@ int main(void) bool showFontAtlas = false; int codepointSize = 0; - int codepoint = 0; char *ptr = text; SetTargetFPS(60); // Set our game to run at 60 frames-per-second @@ -77,13 +76,13 @@ int main(void) if (IsKeyPressed(KEY_RIGHT)) { // Get next codepoint in string and move pointer - codepoint = GetCodepointNext(ptr, &codepointSize); + GetCodepointNext(ptr, &codepointSize); ptr += codepointSize; } else if (IsKeyPressed(KEY_LEFT)) { // Get previous codepoint in string and move pointer - codepoint = GetCodepointPrevious(ptr, &codepointSize); + GetCodepointPrevious(ptr, &codepointSize); ptr -= codepointSize; } //----------------------------------------------------------------------------------