Merge pull request #1540 from taosdata/feature/dnode

fix warnings
This commit is contained in:
slguan 2020-04-06 17:58:38 +08:00 committed by GitHub
commit fb92f93f11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ static int32_t mgmtRetrieveDnodes(SShowObj *pShow, char *data, int32_t rows, voi
extern int32_t clusterInit(); extern int32_t clusterInit();
extern void clusterCleanUp(); extern void clusterCleanUp();
extern int32_t clusterGetDnodesNum(); extern int32_t clusterGetDnodesNum();
extern void * clusterGetNextDnode(void *pNode, void **pDnode); extern void * clusterGetNextDnode(void *pNode, SDnodeObj **pDnode);
extern void clusterIncDnodeRef(SDnodeObj *pDnode); extern void clusterIncDnodeRef(SDnodeObj *pDnode);
extern void clusterDecDnodeRef(SDnodeObj *pDnode); extern void clusterDecDnodeRef(SDnodeObj *pDnode);
extern SDnodeObj* clusterGetDnode(int32_t dnodeId); extern SDnodeObj* clusterGetDnode(int32_t dnodeId);

View File

@ -126,7 +126,7 @@ int taosUpdateIdPool(id_pool_t *handle, int maxId) {
return -1; return -1;
} }
int *idList = calloc(maxId, sizeof(bool)); bool *idList = calloc(maxId, sizeof(bool));
if (idList == NULL) { if (idList == NULL) {
return -1; return -1;
} }
@ -137,7 +137,7 @@ int taosUpdateIdPool(id_pool_t *handle, int maxId) {
pIdPool->numOfFree += (maxId - pIdPool->maxId); pIdPool->numOfFree += (maxId - pIdPool->maxId);
pIdPool->maxId = maxId; pIdPool->maxId = maxId;
int *oldIdList = pIdPool->freeList; bool *oldIdList = pIdPool->freeList;
pIdPool->freeList = idList; pIdPool->freeList = idList;
free(oldIdList); free(oldIdList);

View File

@ -77,7 +77,7 @@ void taosUnLockNote(int fd, taosNoteInfo * pNote)
void *taosThreadToOpenNewNote(void *param) void *taosThreadToOpenNewNote(void *param)
{ {
char name[NOTE_FILE_NAME_LEN]; char name[NOTE_FILE_NAME_LEN * 2];
taosNoteInfo * pNote = (taosNoteInfo *)param; taosNoteInfo * pNote = (taosNoteInfo *)param;
pNote->taosNoteFlag ^= 1; pNote->taosNoteFlag ^= 1;
@ -170,7 +170,7 @@ void taosGetNoteName(char *fn, taosNoteInfo * pNote)
int taosOpenNoteWithMaxLines(char *fn, int maxLines, int maxNoteNum, taosNoteInfo * pNote) int taosOpenNoteWithMaxLines(char *fn, int maxLines, int maxNoteNum, taosNoteInfo * pNote)
{ {
char name[NOTE_FILE_NAME_LEN] = "\0"; char name[NOTE_FILE_NAME_LEN * 2] = "\0";
struct stat notestat0, notestat1; struct stat notestat0, notestat1;
int size; int size;