fix some compile warning

This commit is contained in:
Hongze Cheng 2021-10-12 16:37:44 +08:00
parent 59de14eaa4
commit 8ce34a9096
4 changed files with 4 additions and 4 deletions

View File

@ -87,7 +87,7 @@ typedef struct {
#define schemaColAt(s, i) ((s)->columns + i) #define schemaColAt(s, i) ((s)->columns + i)
#define tdFreeSchema(s) tfree((s)) #define tdFreeSchema(s) tfree((s))
STSchema *tdDupSchema(STSchema *pSchema); STSchema *tdDupSchema(const STSchema *pSchema);
int tdEncodeSchema(void **buf, STSchema *pSchema); int tdEncodeSchema(void **buf, STSchema *pSchema);
void * tdDecodeSchema(void *buf, STSchema **pRSchema); void * tdDecodeSchema(void *buf, STSchema **pRSchema);

View File

@ -20,7 +20,7 @@
extern "C" { extern "C" {
#endif #endif
void taosRemoveDir(char *dirname); void taosRemoveDir(const char *dirname);
bool taosDirExist(char *dirname); bool taosDirExist(char *dirname);
bool taosMkDir(char *dirname); bool taosMkDir(char *dirname);
void taosRemoveOldFiles(char *dirname, int32_t keepDays); void taosRemoveOldFiles(char *dirname, int32_t keepDays);

View File

@ -48,7 +48,7 @@ int tdAllocMemForCol(SDataCol *pCol, int maxPoints) {
/** /**
* Duplicate the schema and return a new object * Duplicate the schema and return a new object
*/ */
STSchema *tdDupSchema(STSchema *pSchema) { STSchema *tdDupSchema(const STSchema *pSchema) {
int tlen = sizeof(STSchema) + sizeof(STColumn) * schemaNCols(pSchema); int tlen = sizeof(STSchema) + sizeof(STColumn) * schemaNCols(pSchema);
STSchema *tSchema = (STSchema *)malloc(tlen); STSchema *tSchema = (STSchema *)malloc(tlen);

View File

@ -34,7 +34,7 @@
#include <unistd.h> #include <unistd.h>
#include <wordexp.h> #include <wordexp.h>
void taosRemoveDir(char *dirname) { void taosRemoveDir(const char *dirname) {
DIR *dir = opendir(dirname); DIR *dir = opendir(dirname);
if (dir == NULL) return; if (dir == NULL) return;