Skip to content

Commit

Permalink
Fix misc. compiler warnings (not errors)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Jun 30, 2024
1 parent c4295c3 commit ae79dd6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion samples/Advanced_Animation/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void renderFrame()

frame.state = Frame::State::rendering;
frame.drawTimer.start();
frame.surface->present([](void* param) {
frame.surface->present([](void*) {
auto& frame = frames[frameIndex];
frameIndex = 1 - frameIndex;
frameTime.update(frame.drawTimer.elapsedTime());
Expand Down
4 changes: 2 additions & 2 deletions samples/Graphic_Editor/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ void processLine(TcpClient& client, String& line)
auto buffer = resourceMap.reset(props.size);
String line;
line += "@:";
if (sizeof(uintptr_t) == 8) {
if(sizeof(uintptr_t) == 8) {
line += "ptr64=;";
}
line += "addr=0x";
Expand Down Expand Up @@ -566,7 +566,7 @@ bool processClientData(TcpClient& client, char* data, int size)
return true;
}

void gotIP(IpAddress ip, IpAddress netmask, IpAddress gateway)
void gotIP(IpAddress, IpAddress, IpAddress)
{
server.setClientReceiveHandler(processClientData);
server.listen(23);
Expand Down
2 changes: 2 additions & 0 deletions src/Colors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ PixelBuffer unpack(PixelBuffer src, PixelFormat format)
}
case PixelFormat::RGB24:
std::swap(src.bgra32.r, src.bgra32.b);
[[fallthrough]];
case PixelFormat::BGR24:
src.bgra32.a = 255;
[[fallthrough]];
default:
return src;
}
Expand Down
1 change: 1 addition & 0 deletions src/RenderQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ void RenderQueue::run()

void RenderQueue::renderDone(const Object* object)
{
assert(object == &item->object);
if(!item->callback) {
item.reset();
return;
Expand Down
2 changes: 1 addition & 1 deletion src/include/Graphics/Blend.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class BlendTransparent : public BlendTemplate<BlendTransparent, BlendMode::Trans
meta.write("key", key);
}

static void blend(PixelFormat format, PackedColor src, uint8_t* dstptr, size_t length)
static void blend(PixelFormat, PackedColor, uint8_t*, size_t)
{
// Makes no sense for this blender
}
Expand Down
2 changes: 1 addition & 1 deletion src/include/Graphics/Drawing/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Renderer : public MultiRenderer
}

protected:
void renderDone(const Object* object) override
void renderDone(const Object*) override
{
this->object.reset();
}
Expand Down
4 changes: 2 additions & 2 deletions src/include/Graphics/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class SceneRenderer : public MultiRenderer
}

protected:
void renderDone(const Object* object) override
void renderDone(const Object*) override
{
}

Expand Down Expand Up @@ -824,7 +824,7 @@ class CopyRenderer : public Renderer
void startRead(Surface& surface);

/* Position is given in `location` */
virtual void readComplete(uint8_t* data, size_t length)
virtual void readComplete([[maybe_unused]] uint8_t* data, [[maybe_unused]] size_t length)
{
}

Expand Down

0 comments on commit ae79dd6

Please sign in to comment.