#43: FILE: test/test_timer.c:143: + static int init = 0;$ ERROR: do not initialise statics to 0
时间: 2024-03-29 18:40:09 浏览: 71
番茄钟:Pomodoro番茄工作法https://en.wikipedia.orgwikiPomodoro_Technique
The error message is telling you not to initialize static variables to 0 explicitly. In C, static variables are implicitly initialized to 0, so there is no need to explicitly set them to 0.
To fix the error, you can simply remove the initialization of the static variable `init` to 0, and let the variable be implicitly initialized to 0. For example:
```
static int init;
```
This will ensure that the static variable is correctly initialized to 0, and avoid the error message.
阅读全文