Fix Quantum Painter compiliation issues with heavy optimization (#24667)

This commit is contained in:
Drashna Jaelre 2024-12-01 21:58:18 -08:00 committed by GitHub
parent fa96609e0b
commit b599c78548
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -255,10 +255,10 @@ bool qgf_validate_stream(qp_stream_t *stream) {
// Read and validate all the frames (automatically validates the frame offset descriptor in the process) // Read and validate all the frames (automatically validates the frame offset descriptor in the process)
for (uint16_t i = 0; i < frame_count; ++i) { for (uint16_t i = 0; i < frame_count; ++i) {
// Validate the frame descriptor block // Validate the frame descriptor block
uint8_t bpp; uint8_t bpp = 0;
bool has_palette; bool has_palette = false;
bool is_panel_native; bool is_panel_native = false;
bool has_delta; bool has_delta = false;
if (!qgf_validate_frame_descriptor(stream, i, &bpp, &has_palette, &is_panel_native, &has_delta)) { if (!qgf_validate_frame_descriptor(stream, i, &bpp, &has_palette, &is_panel_native, &has_delta)) {
return false; return false;
} }

View File

@ -318,9 +318,9 @@ static deferred_token qp_render_animation_state(animation_state_t *state, uint16
} }
static uint32_t animation_callback(uint32_t trigger_time, void *cb_arg) { static uint32_t animation_callback(uint32_t trigger_time, void *cb_arg) {
animation_state_t *state = (animation_state_t *)cb_arg; animation_state_t *state = (animation_state_t *)cb_arg;
uint16_t delay_ms; uint16_t delay_ms = 0;
bool ret = qp_render_animation_state(state, &delay_ms); bool ret = qp_render_animation_state(state, &delay_ms);
if (!ret) { if (!ret) {
// Setting the device to NULL clears the animation slot // Setting the device to NULL clears the animation slot
state->device = NULL; state->device = NULL;