enh: compile problem in release mode
This commit is contained in:
parent
0f3617187f
commit
53645e86e1
|
@ -104,7 +104,7 @@ int32_t tsdbOpenFile(const char *path, STsdb *pTsdb, int32_t flag, STsdbFD **ppF
|
||||||
}
|
}
|
||||||
|
|
||||||
pFD->path = (char *)&pFD[1];
|
pFD->path = (char *)&pFD[1];
|
||||||
tstrncpy(pFD->path, path, strlen(path) + 1);
|
memcpy(pFD->path, path, strlen(path) + 1);
|
||||||
pFD->szPage = szPage;
|
pFD->szPage = szPage;
|
||||||
pFD->flag = flag;
|
pFD->flag = flag;
|
||||||
pFD->szPage = szPage;
|
pFD->szPage = szPage;
|
||||||
|
|
|
@ -330,7 +330,7 @@ static int32_t vnodeAsyncInit(SVAsync **async, const char *label) {
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
tstrncpy((char *)((*async) + 1), label, strlen(label) + 1);
|
memcpy((char *)((*async) + 1), label, strlen(label) + 1);
|
||||||
(*async)->label = (const char *)((*async) + 1);
|
(*async)->label = (const char *)((*async) + 1);
|
||||||
|
|
||||||
(void)taosThreadMutexInit(&(*async)->mutex, NULL);
|
(void)taosThreadMutexInit(&(*async)->mutex, NULL);
|
||||||
|
|
|
@ -417,7 +417,7 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC
|
||||||
}
|
}
|
||||||
|
|
||||||
pVnode->path = (char *)&pVnode[1];
|
pVnode->path = (char *)&pVnode[1];
|
||||||
tstrncpy(pVnode->path, path, strlen(path) + 1);
|
memcpy(pVnode->path, path, strlen(path) + 1);
|
||||||
pVnode->config = info.config;
|
pVnode->config = info.config;
|
||||||
pVnode->state.committed = info.state.committed;
|
pVnode->state.committed = info.state.committed;
|
||||||
pVnode->state.commitTerm = info.state.commitTerm;
|
pVnode->state.commitTerm = info.state.commitTerm;
|
||||||
|
|
Loading…
Reference in New Issue