Skip to content

Commit

Permalink
fix warnings in non-debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Sep 20, 2023
1 parent e635d1f commit 5c3cb65
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
3 changes: 3 additions & 0 deletions sources/libcore/concurrent/concurrent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,10 @@ namespace cage

void currentThreadName(const String &name)
{
#ifdef CAGE_DEBUG
const String oldName = currentThreadName_();
#endif

currentThreadName_() = name;

if (!name.empty())
Expand Down
14 changes: 7 additions & 7 deletions sources/libcore/filesystem/abstractFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,20 @@ namespace cage
return archiveOpenZipTry(parent->openFile(inPath, FileMode(true, false)));
}

void walkLeft(String &p, String &i)
{
const String s = pathJoin(p, "..");
i = pathJoin(subString(p, s.length() + 1, m), i);
p = s;
}

void walkRight(String &p, String &i)
{
const String k = split(i, "/");
p = pathJoin(p, k);
}

#ifdef CAGE_DEBUG
void walkLeft(String &p, String &i)
{
const String s = pathJoin(p, "..");
i = pathJoin(subString(p, s.length() + 1, m), i);
p = s;
}

class WalkTester : private Immovable
{
public:
Expand Down
2 changes: 1 addition & 1 deletion sources/libengine/graphics/shaderProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,8 @@ namespace cage

void ShaderProgram::compute(const Vec3i &groupsCounts)
{
const ShaderProgramImpl *impl = (const ShaderProgramImpl *)this;
#ifdef CAGE_ASSERT_ENABLED
const ShaderProgramImpl *impl = (const ShaderProgramImpl *)this;
CAGE_ASSERT(boundShader == impl->id);
#endif
glDispatchCompute(groupsCounts[0], groupsCounts[1], groupsCounts[2]);
Expand Down
2 changes: 2 additions & 0 deletions sources/test-core/exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,6 @@ void testExceptions()
}
detail::globalBreakpointOverride(true);
}

(void)&assertFailureFunction; // maybe unused
}

0 comments on commit 5c3cb65

Please sign in to comment.