fix -Wpedantic
This commit is contained in:
@@ -64,7 +64,7 @@ static inline void test_screen(struct event* e) {
|
|||||||
|
|
||||||
// edit
|
// edit
|
||||||
static struct edit ed1 = {.str = "Edit 1"};
|
static struct edit ed1 = {.str = "Edit 1"};
|
||||||
static struct edit ed2 = {};
|
static struct edit ed2 = {0};
|
||||||
edit(&ed1, 1, 10, 32, 0xff00ff);
|
edit(&ed1, 1, 10, 32, 0xff00ff);
|
||||||
sprintf(buf, "cursor: %d length: %d", ed1.cursor, ed1.length);
|
sprintf(buf, "cursor: %d length: %d", ed1.cursor, ed1.length);
|
||||||
label(buf, 2, 13, A, A, 0xf);
|
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("$£ह€𐍈6789", 1, 2, A, A, 0x0f05);
|
||||||
label("圍棋56789", 1, 3, A, A, 0x0f05);
|
label("圍棋56789", 1, 3, A, A, 0x0f05);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
while (tim_run(1.5)) {
|
while (tim_run(1.5)) {
|
||||||
|
|||||||
2
tim.h
2
tim.h
@@ -703,7 +703,7 @@ static void read_event(int timeout_ms) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int64_t time_us(void) {
|
static inline int64_t time_us(void) {
|
||||||
struct timespec ts = {};
|
struct timespec ts = {0};
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
return ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
return ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user