TD-1037 minor changes
This commit is contained in:
parent
d5ac976e95
commit
3c6ecff506
|
@ -1353,12 +1353,12 @@ uint32_t crc32c_hw(uint32_t crc, crc_stream buf, size_t len) {
|
|||
#endif // #ifndef _TD_ARM_
|
||||
|
||||
void taosResolveCRC() {
|
||||
#ifndef _TD_ARM_
|
||||
#if defined _TD_ARM_ || defined WINDOWS
|
||||
crc32c = crc32c_sf;
|
||||
#else
|
||||
int sse42;
|
||||
SSE42(sse42);
|
||||
crc32c = sse42 ? crc32c_hw : crc32c_sf;
|
||||
#else
|
||||
crc32c = crc32c_sf;
|
||||
#endif
|
||||
/* return sse42 ? crc32c_hw(crci, bytes, len) : crc32c_sf(crci, bytes, len);
|
||||
*/
|
||||
|
|
|
@ -522,7 +522,7 @@ static int tdRestoreKVStore(SKVStore *pStore) {
|
|||
|
||||
maxBufSize = MAX(maxBufSize, rInfo.size);
|
||||
|
||||
if (lseek(pStore->fd, rInfo.size, SEEK_CUR) < 0) {
|
||||
if (lseek(pStore->fd, (off_t)rInfo.size, SEEK_CUR) < 0) {
|
||||
uError("failed to lseek file %s since %s", pStore->fname, strerror(errno));
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
goto _err;
|
||||
|
@ -550,7 +550,7 @@ static int tdRestoreKVStore(SKVStore *pStore) {
|
|||
while (taosHashIterNext(pIter)) {
|
||||
SKVRecord *pRecord = taosHashIterGet(pIter);
|
||||
|
||||
if (lseek(pStore->fd, pRecord->offset + sizeof(SKVRecord), SEEK_SET) < 0) {
|
||||
if (lseek(pStore->fd, (off_t)(pRecord->offset + sizeof(SKVRecord)), SEEK_SET) < 0) {
|
||||
uError("failed to lseek file %s since %s, offset %" PRId64, pStore->fname, strerror(errno), pRecord->offset);
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
goto _err;
|
||||
|
|
|
@ -13,11 +13,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "os.h"
|
||||
#include "tulog.h"
|
||||
#include "tmempool.h"
|
||||
#include "tutil.h"
|
||||
|
|
Loading…
Reference in New Issue