remove more void

This commit is contained in:
Hongze Cheng 2024-09-26 11:27:01 +08:00
parent 92710e1352
commit 0e1ef424fa
7 changed files with 27 additions and 26 deletions

View File

@ -153,11 +153,10 @@ int32_t tsDecompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int
int32_t getWordLength(char type); int32_t getWordLength(char type);
int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, char *const output, const char type); int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, char *const output, const char type);
int32_t tsDecompressFloatImplAvx512(const char *const input, const int32_t nelements, char *const output); void tsDecompressFloatImplAvx512(const char *const input, const int32_t nelements, char *const output);
int32_t tsDecompressFloatImplAvx2(const char *const input, const int32_t nelements, char *const output); void tsDecompressFloatImplAvx2(const char *const input, const int32_t nelements, char *const output);
int32_t tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, void tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, bool bigEndian);
bool bigEndian); void tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, char *const output, bool bigEndian);
int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, char *const output, bool bigEndian);
/************************************************************************* /*************************************************************************
* REGULAR COMPRESSION 2 * REGULAR COMPRESSION 2

View File

@ -38,9 +38,7 @@ int32_t sndBuildStreamTask(SSnode *pSnode, SStreamTask *pTask, int64_t nextProce
streamTaskOpenAllUpstreamInput(pTask); streamTaskOpenAllUpstreamInput(pTask);
streamTaskResetUpstreamStageInfo(pTask); streamTaskResetUpstreamStageInfo(pTask);
if (streamSetupScheduleTrigger(pTask) != 0) { streamSetupScheduleTrigger(pTask);
sndError("failed to setup schedule trigger for task:%s", pTask->id.idStr);
}
SCheckpointInfo *pChkInfo = &pTask->chkInfo; SCheckpointInfo *pChkInfo = &pTask->chkInfo;
tqSetRestoreVersionInfo(pTask); tqSetRestoreVersionInfo(pTask);

View File

@ -452,7 +452,8 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC
// open wal // open wal
sprintf(tdir, "%s%s%s", dir, TD_DIRSEP, VNODE_WAL_DIR); sprintf(tdir, "%s%s%s", dir, TD_DIRSEP, VNODE_WAL_DIR);
(void)taosRealPath(tdir, NULL, sizeof(tdir)); ret = taosRealPath(tdir, NULL, sizeof(tdir));
TAOS_UNUSED(ret);
pVnode->pWal = walOpen(tdir, &(pVnode->config.walCfg)); pVnode->pWal = walOpen(tdir, &(pVnode->config.walCfg));
if (pVnode->pWal == NULL) { if (pVnode->pWal == NULL) {
@ -462,7 +463,8 @@ SVnode *vnodeOpen(const char *path, int32_t diskPrimary, STfs *pTfs, SMsgCb msgC
// open tq // open tq
sprintf(tdir, "%s%s%s", dir, TD_DIRSEP, VNODE_TQ_DIR); sprintf(tdir, "%s%s%s", dir, TD_DIRSEP, VNODE_TQ_DIR);
(void)taosRealPath(tdir, NULL, sizeof(tdir)); ret = taosRealPath(tdir, NULL, sizeof(tdir));
TAOS_UNUSED(ret);
// open query // open query
if (vnodeQueryOpen(pVnode)) { if (vnodeQueryOpen(pVnode)) {

View File

@ -2235,7 +2235,10 @@ static int32_t vnodeProcessBatchDeleteReq(SVnode *pVnode, int64_t ver, void *pRe
SBatchDeleteReq deleteReq; SBatchDeleteReq deleteReq;
SDecoder decoder; SDecoder decoder;
tDecoderInit(&decoder, pReq, len); tDecoderInit(&decoder, pReq, len);
(void)tDecodeSBatchDeleteReq(&decoder, &deleteReq); if (tDecodeSBatchDeleteReq(&decoder, &deleteReq) < 0) {
tDecoderClear(&decoder);
return terrno = TSDB_CODE_INVALID_MSG;
}
SMetaReader mr = {0}; SMetaReader mr = {0};
metaReaderDoInit(&mr, pVnode->pMeta, META_READER_NOLOCK); metaReaderDoInit(&mr, pVnode->pMeta, META_READER_NOLOCK);

View File

@ -404,7 +404,7 @@ SCacheObj *taosCacheInit(int32_t keyType, int64_t refreshTimeInMs, bool extendLi
return NULL; return NULL;
} }
(void)doRegisterCacheObj(pCacheObj); TdThread refreshWorker = doRegisterCacheObj(pCacheObj);
return pCacheObj; return pCacheObj;
} }

View File

@ -825,9 +825,9 @@ int32_t tsDecompressTimestampImp(const char *const input, const int32_t nelement
return nelements * longBytes; return nelements * longBytes;
} else if (input[0] == 1) { // Decompress } else if (input[0] == 1) { // Decompress
if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) {
(void)tsDecompressTimestampAvx512(input, nelements, output, false); tsDecompressTimestampAvx512(input, nelements, output, false);
} else if (tsSIMDEnable && tsAVX2Supported) { } else if (tsSIMDEnable && tsAVX2Supported) {
(void)tsDecompressTimestampAvx2(input, nelements, output, false); tsDecompressTimestampAvx2(input, nelements, output, false);
} else { } else {
int64_t *ostream = (int64_t *)output; int64_t *ostream = (int64_t *)output;
@ -1201,9 +1201,9 @@ int32_t tsDecompressFloatImp(const char *const input, const int32_t nelements, c
} }
if (tsSIMDEnable && tsAVX2Supported) { if (tsSIMDEnable && tsAVX2Supported) {
(void)tsDecompressFloatImplAvx2(input, nelements, output); tsDecompressFloatImplAvx2(input, nelements, output);
} else if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { } else if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) {
(void)tsDecompressFloatImplAvx512(input, nelements, output); tsDecompressFloatImplAvx512(input, nelements, output);
} else { // alternative implementation without SIMD instructions. } else { // alternative implementation without SIMD instructions.
tsDecompressFloatHelper(input, nelements, (float *)output); tsDecompressFloatHelper(input, nelements, (float *)output);
} }

View File

@ -313,23 +313,22 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements,
return nelements * word_length; return nelements * word_length;
} }
int32_t tsDecompressFloatImplAvx512(const char *const input, const int32_t nelements, char *const output) { void tsDecompressFloatImplAvx512(const char *const input, const int32_t nelements, char *const output) {
#if __AVX512F__ #if __AVX512F__
// todo add it // todo add it
#endif #endif
return 0; return;
} }
// todo add later // todo add later
int32_t tsDecompressFloatImplAvx2(const char *const input, const int32_t nelements, char *const output) { void tsDecompressFloatImplAvx2(const char *const input, const int32_t nelements, char *const output) {
#if __AVX2__ #if __AVX2__
#endif #endif
return 0; return;
} }
// decode two timestamps in one loop. // decode two timestamps in one loop.
int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, char *const output, void tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, char *const output, bool bigEndian) {
bool bigEndian) {
int64_t *ostream = (int64_t *)output; int64_t *ostream = (int64_t *)output;
int32_t ipos = 1, opos = 0; int32_t ipos = 1, opos = 0;
@ -466,10 +465,10 @@ int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelemen
} }
} }
#endif #endif
return 0; return;
} }
int32_t tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output, void tsDecompressTimestampAvx512(const char *const input, const int32_t nelements, char *const output,
bool UNUSED_PARAM(bigEndian)) { bool UNUSED_PARAM(bigEndian)) {
int64_t *ostream = (int64_t *)output; int64_t *ostream = (int64_t *)output;
int32_t ipos = 1, opos = 0; int32_t ipos = 1, opos = 0;
@ -581,5 +580,5 @@ int32_t tsDecompressTimestampAvx512(const char *const input, const int32_t nelem
} }
#endif #endif
return 0; return;
} }