fix: compile errors
This commit is contained in:
parent
acf6a6e966
commit
bf3e10c36e
|
@ -78,10 +78,17 @@ void taos_block_sigalrm(void) {
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
static void taosDeleteTimer(void *tharg) {
|
||||||
|
timer_t *pTimer = tharg;
|
||||||
|
TAOS_SKIP_ERROR(timer_delete(*pTimer));
|
||||||
|
}
|
||||||
|
|
||||||
static TdThread timerThread;
|
static TdThread timerThread;
|
||||||
static timer_t timerId;
|
static timer_t timerId;
|
||||||
static volatile bool stopTimer = false;
|
static volatile bool stopTimer = false;
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||||
static void *taosProcessAlarmSignal(void *tharg) {
|
static void *taosProcessAlarmSignal(void *tharg) {
|
||||||
// Block the signal
|
// Block the signal
|
||||||
sigset_t sigset;
|
sigset_t sigset;
|
||||||
|
@ -109,6 +116,8 @@ static void *taosProcessAlarmSignal(void *tharg) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
taosThreadCleanupPush(taosDeleteTimer, &timerId);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
struct itimerspec ts;
|
struct itimerspec ts;
|
||||||
ts.it_value.tv_sec = 0;
|
ts.it_value.tv_sec = 0;
|
||||||
|
@ -134,10 +143,11 @@ static void *taosProcessAlarmSignal(void *tharg) {
|
||||||
}
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
timer_delete(timerId);
|
taosThreadCleanupPop(1);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int taosInitTimer(void (*callback)(int), int ms) {
|
int taosInitTimer(void (*callback)(int), int ms) {
|
||||||
|
|
|
@ -1267,6 +1267,9 @@ void *shellCancelHandler(void *arg) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||||
|
|
||||||
void *shellThreadLoop(void *arg) {
|
void *shellThreadLoop(void *arg) {
|
||||||
setThreadName("shellThreadLoop");
|
setThreadName("shellThreadLoop");
|
||||||
taosGetOldTerminalMode();
|
taosGetOldTerminalMode();
|
||||||
|
@ -1298,6 +1301,7 @@ void *shellThreadLoop(void *arg) {
|
||||||
taosThreadCleanupPop(1);
|
taosThreadCleanupPop(1);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
int32_t shellExecute() {
|
int32_t shellExecute() {
|
||||||
printf(shell.info.clientVersion, shell.info.cusName, taos_get_client_info(), shell.info.cusName);
|
printf(shell.info.clientVersion, shell.info.cusName, taos_get_client_info(), shell.info.cusName);
|
||||||
|
|
Loading…
Reference in New Issue