From b8932a39721ea0ec4522b80aab6bad5f9bc81b88 Mon Sep 17 00:00:00 2001 From: Chu'vok Date: Wed, 18 Sep 2024 12:47:17 +0200 Subject: [PATCH] fix -Wpedantic --- test/test.c | 4 ++-- tim.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test.c b/test/test.c index c37f343..a39a138 100644 --- a/test/test.c +++ b/test/test.c @@ -64,7 +64,7 @@ static inline void test_screen(struct event* e) { // edit static struct edit ed1 = {.str = "Edit 1"}; - static struct edit ed2 = {}; + static struct edit ed2 = {0}; edit(&ed1, 1, 10, 32, 0xff00ff); sprintf(buf, "cursor: %d length: %d", ed1.cursor, ed1.length); label(buf, 2, 13, A, A, 0xf); @@ -106,7 +106,7 @@ static inline void test_screen(struct event* e) { label("$£ह€𐍈6789", 1, 2, A, A, 0x0f05); label("圍棋56789", 1, 3, A, A, 0x0f05); } -}; +} int main(void) { while (tim_run(1.5)) { diff --git a/tim.h b/tim.h index 4250fab..1f531e5 100644 --- a/tim.h +++ b/tim.h @@ -703,7 +703,7 @@ static void read_event(int timeout_ms) { } static inline int64_t time_us(void) { - struct timespec ts = {}; + struct timespec ts = {0}; clock_gettime(CLOCK_MONOTONIC, &ts); return ts.tv_sec * 1000000 + ts.tv_nsec / 1000; }