diff --git a/doc/tutorial/14_lua.cpp b/doc/tutorial/14_lua.cpp index b6b589dd..2ef8625f 100644 --- a/doc/tutorial/14_lua.cpp +++ b/doc/tutorial/14_lua.cpp @@ -2,7 +2,7 @@ // Lol Engine — Lua tutorial // // Copyright © 2014—2017 Benjamin “Touky” Huet -// © 2017—2018 Sam Hocevar +// © 2017—2020 Sam Hocevar // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -29,10 +29,8 @@ class DemoObject : public LuaObject public: DemoObject() : LuaObject() {} virtual ~DemoObject() {} - static DemoObject* New(lua_State* l, int arg_nb) + static DemoObject* New(lua_State *, int) { - UNUSED(l); - UNUSED(arg_nb); return new DemoObject(); } @@ -61,9 +59,8 @@ public: return (stack << f).End(); } - float AddTenMethod(float f, int32_t i, int32_t i2) + float AddTenMethod(float f, int32_t, int32_t) { - UNUSED(i, i2); return (f + 10); } diff --git a/src/application/android-app.cpp b/src/application/android-app.cpp index 58c237ee..e09db561 100644 --- a/src/application/android-app.cpp +++ b/src/application/android-app.cpp @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2019 Sam Hocevar +// Copyright © 2010—2020 Sam Hocevar // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -391,14 +391,12 @@ void lol_android_main(void) { } -void lol_android_main(int argc, char **argv) +void lol_android_main(int, char **) { - UNUSED(argc, argv); } -void lol_android_main(int argc, char **argv, char **envp) +void lol_android_main(int, char **, char **) { - UNUSED(argc, argv, envp); } #endif /* __ANDROID__ */ diff --git a/src/easymesh/easymeshlua.cpp b/src/easymesh/easymeshlua.cpp index d527482e..06b0de88 100644 --- a/src/easymesh/easymeshlua.cpp +++ b/src/easymesh/easymeshlua.cpp @@ -86,10 +86,8 @@ EasyMeshLuaObject::~EasyMeshLuaObject() } //----------------------------------------------------------------------------- -EasyMeshLuaObject* EasyMeshLuaObject::New(lua_State* l, int arg_nb) +EasyMeshLuaObject* EasyMeshLuaObject::New(lua_State *, int) { - UNUSED(l); - UNUSED(arg_nb); LuaStack s = LuaStack::Begin(l); std::string str = s.Get(""); return new EasyMeshLuaObject(str); @@ -200,7 +198,8 @@ bool EasyMesh::Compile(char const *command, bool execute) { bool res = false; // FIXME: make this work again - UNUSED(command, execute); + (void)command; + (void)execute; #if 0 EasyMeshCompiler mc(*this); BD()->Enable(MeshBuildOperation::CommandRecording); diff --git a/src/gpu/shader.cpp b/src/gpu/shader.cpp index 7f9c43dc..0d3feba4 100644 --- a/src/gpu/shader.cpp +++ b/src/gpu/shader.cpp @@ -684,7 +684,7 @@ std::string ShaderData::Patch(std::string const &code, ShaderType type) size_t l0 = strlen(rep[0]); size_t l1 = strlen(rep[1]); - UNUSED(l1); + (void)l1; std::string left = patched_code.substr(0, index); std::string right = patched_code.substr(index + l0, patched_code.length() - (index + l0)); diff --git a/src/image/codec/android-image.cpp b/src/image/codec/android-image.cpp index 2ef3efc5..967e3025 100644 --- a/src/image/codec/android-image.cpp +++ b/src/image/codec/android-image.cpp @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2018 Sam Hocevar +// Copyright © 2010—2020 Sam Hocevar // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -115,9 +115,9 @@ ResourceCodecData* AndroidImageCodec::Load(std::string const &path) bool AndroidImageCodec::Save(std::string const &path, ResourceCodecData* data) { - UNUSED(path, data); - /* TODO: unimplemented */ + (void)path; + (void)data; return false; } diff --git a/src/image/codec/ios-image.cpp b/src/image/codec/ios-image.cpp index 18d3b6a2..4114a56c 100644 --- a/src/image/codec/ios-image.cpp +++ b/src/image/codec/ios-image.cpp @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2018 Sam Hocevar +// Copyright © 2010—2020 Sam Hocevar // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -82,9 +82,9 @@ ResourceCodecData* IosImageCodec::Load(std::string const &path) bool IosImageCodec::Save(std::string const &path, ResourceCodecData* data) { - UNUSED(path, data); - /* TODO: unimplemented */ + (void)path; + (void)data; return true; } diff --git a/src/image/movie.cpp b/src/image/movie.cpp index 3f4e9757..111c57e7 100644 --- a/src/image/movie.cpp +++ b/src/image/movie.cpp @@ -42,7 +42,7 @@ static std::string error2string(int errnum) /*static void ffmpeg_logger(void *ptr, int level, const char *fmt, va_list vl) { // FIXME: use lol::msg::debug - UNUSED(ptr, level); + (void)ptr; (void)level; vfprintf(stderr, fmt, vl); }*/ #endif @@ -100,7 +100,7 @@ bool movie::open_file(std::string const &filename) } return true; #else - UNUSED(filename); + (void)filename; return false; #endif } @@ -152,7 +152,7 @@ bool movie::push_image(image &im) } } #else - UNUSED(im); + (void)im; #endif return true; diff --git a/src/mesh/mesh.cpp b/src/mesh/mesh.cpp index 45c8d6e5..0906b47a 100644 --- a/src/mesh/mesh.cpp +++ b/src/mesh/mesh.cpp @@ -137,7 +137,7 @@ void SubMesh::Render() m_vdecl->SetStream(m_vbos[i], attribs); } - UNUSED(vertex_count); + (void)vertex_count; for (size_t i = 0; i < m_textures.size(); ++i) { diff --git a/src/video.cpp b/src/video.cpp index f37ff5ed..197140ee 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2019 Sam Hocevar +// Copyright © 2010—2020 Sam Hocevar // // Lol Engine is free software. It comes without any warranty, to // the extent permitted by applicable law. You can redistribute it @@ -116,7 +116,7 @@ void Video::Capture(uint32_t *buffer) buffer[(height - j - 1) * width + i] = tmp; } #else - UNUSED(buffer); + (void)buffer; #endif }