Skip to content

Commit a6f255f

Browse files
committed
vdisp/sdl2: fix clang align warning
1 parent 03b3a87 commit a6f255f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/video_display/sdl2.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#include <math.h> // for sqrt
5858
#include <pthread.h> // for pthread_mutex_unlock, pthread_mutex_lock
5959
#include <stdbool.h> // for true, bool, false
60-
#include <stdint.h> // for int64_t, uint32_t
60+
#include <stdint.h> // for int64_t, uint32_t, uintptr_t
6161
#include <stdio.h> // for printf, sscanf, snprintf
6262
#include <stdlib.h> // for atoi, free, calloc
6363
#include <string.h> // for NULL, strlen, strcmp, strstr, strchr
@@ -895,8 +895,9 @@ static bool display_sdl2_putf(void *state, struct video_frame *frame, long long
895895

896896
// fix endianness
897897
if (frame->color_spec == R10k) {
898+
assert((uintptr_t) frame->tiles[0].data % 4 == 0);
898899
r10k_to_sdl2(frame->tiles[0].data_len / 4,
899-
(uint32_t *) frame->tiles[0].data);
900+
(uint32_t *) (void *) frame->tiles[0].data);
900901
}
901902

902903
pthread_mutex_lock(&s->lock);

0 commit comments

Comments
 (0)