提交 6d17dbc0 编写于 作者: S slguan

Clean up some warnings

上级 125636e9
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#define _XOPEN_SOURCE #define _XOPEN_SOURCE
#pragma GCC diagnostic ignored "-Woverflow" #pragma GCC diagnostic ignored "-Woverflow"
#pragma GCC diagnostic ignored "-Wunused-variable"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
#define _XOPEN_SOURCE #define _XOPEN_SOURCE
#define _BSD_SOURCE #define _DEFAULT_SOURCE
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "tschemautil.h" #include "tschemautil.h"
#include "tsclient.h" #include "tsclient.h"
#include "tsql.h" #include "tsql.h"
#pragma GCC diagnostic ignored "-Wunused-variable"
typedef struct SColumnIdList { typedef struct SColumnIdList {
SSchema* pSchema; SSchema* pSchema;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
#define _XOPEN_SOURCE #define _XOPEN_SOURCE
#define _BSD_SOURCE #define _DEFAULT_SOURCE
#include <assert.h> #include <assert.h>
#include <pthread.h> #include <pthread.h>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* #define _GNU_SOURCE */ #define _GNU_SOURCE
#include <argp.h> #include <argp.h>
#include <assert.h> #include <assert.h>
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <wordexp.h> #include <wordexp.h>
#include "taos.h" #include "taos.h"
#pragma GCC diagnostic ignored "-Wmissing-braces"
#define BUFFER_SIZE 65536 #define BUFFER_SIZE 65536
#define MAX_DB_NAME_SIZE 64 #define MAX_DB_NAME_SIZE 64
...@@ -567,7 +568,7 @@ void *readTable(void *sarg) { ...@@ -567,7 +568,7 @@ void *readTable(void *sarg) {
} }
fprintf(fp, "|%10s | %10d | %12.2f | %10.2f |\n", fprintf(fp, "|%10s | %10d | %12.2f | %10.2f |\n",
aggreFunc[j] == "*" ? " * " : aggreFunc[j], totalData, aggreFunc[j][0] == '*' ? " * " : aggreFunc[j], totalData,
(double)(num_of_tables * num_of_DPT) / totalT, totalT * 1000); (double)(num_of_tables * num_of_DPT) / totalT, totalT * 1000);
printf("select %10s took %.6f second(s)\n", aggreFunc[j], totalT); printf("select %10s took %.6f second(s)\n", aggreFunc[j], totalT);
} }
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
#include "tudp.h" #include "tudp.h"
#include "tutil.h" #include "tutil.h"
#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
typedef struct _msg_node { typedef struct _msg_node {
struct _msg_node *next; struct _msg_node *next;
void * ahandle; void * ahandle;
......
...@@ -503,6 +503,8 @@ void vnodeRemoveVnode(int vnode); ...@@ -503,6 +503,8 @@ void vnodeRemoveVnode(int vnode);
int vnodeCreateVnode(int vnode, SVnodeCfg *pCfg, SVPeerDesc *pDesc); int vnodeCreateVnode(int vnode, SVnodeCfg *pCfg, SVPeerDesc *pDesc);
void vnodeOpenStreams(void *param, void *tmrId);
void vnodeCreateStream(SMeterObj *pObj); void vnodeCreateStream(SMeterObj *pObj);
void vnodeRemoveStream(SMeterObj *pObj); void vnodeRemoveStream(SMeterObj *pObj);
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "mgmt.h" #include "mgmt.h"
#include "tschemautil.h" #include "tschemautil.h"
#include "tstatus.h" #include "tstatus.h"
#pragma GCC diagnostic ignored "-Wunused-variable"
SDnodeObj dnodeObj; SDnodeObj dnodeObj;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "mgmt.h" #include "mgmt.h"
#include "tsched.h" #include "tsched.h"
#include "tutil.h" #include "tutil.h"
#pragma GCC diagnostic ignored "-Wpointer-sign"
int mgmtSendVPeersMsg(SVgObj *pVgroup, SDbObj *pDb); int mgmtSendVPeersMsg(SVgObj *pVgroup, SDbObj *pDb);
char *mgmtBuildVpeersIe(char *pMsg, SVgObj *pVgroup, SDbObj *pDb); char *mgmtBuildVpeersIe(char *pMsg, SVgObj *pVgroup, SDbObj *pDb);
......
...@@ -516,7 +516,6 @@ int mgmtCreateMeter(SDbObj *pDb, SCreateTableMsg *pCreate) { ...@@ -516,7 +516,6 @@ int mgmtCreateMeter(SDbObj *pDb, SCreateTableMsg *pCreate) {
STabObj * pMetric = NULL; STabObj * pMetric = NULL;
SVgObj * pVgroup = NULL; SVgObj * pVgroup = NULL;
int size = 0; int size = 0;
SAcctObj *pAcct = NULL;
int numOfTables = sdbGetNumOfRows(meterSdb); int numOfTables = sdbGetNumOfRows(meterSdb);
if (numOfTables >= tsMaxTables) { if (numOfTables >= tsMaxTables) {
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include "mgmt.h" #include "mgmt.h"
#include "mgmtProfile.h" #include "mgmtProfile.h"
#include "tlog.h" #include "tlog.h"
#pragma GCC diagnostic ignored "-Wint-conversion"
#pragma GCC diagnostic ignored "-Wpointer-sign"
void * pShellConn = NULL; void * pShellConn = NULL;
SConnObj *connList; SConnObj *connList;
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "mgmt.h" #include "mgmt.h"
#include "tschemautil.h" #include "tschemautil.h"
#pragma GCC diagnostic ignored "-Wunused-variable"
void * vgSdb = NULL; void * vgSdb = NULL;
int tsVgUpdateSize; int tsVgUpdateSize;
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "vnodeMgmt.h" #include "vnodeMgmt.h"
#include "vnodeShell.h" #include "vnodeShell.h"
#include "vnodeUtil.h" #include "vnodeUtil.h"
#pragma GCC diagnostic ignored "-Wpointer-sign"
#pragma GCC diagnostic ignored "-Wint-conversion"
typedef struct { typedef struct {
SCompHeader *headList; SCompHeader *headList;
...@@ -61,7 +63,6 @@ typedef struct { ...@@ -61,7 +63,6 @@ typedef struct {
int rows; int rows;
} SImportInfo; } SImportInfo;
#define EXTRA_BYTES 8
int vnodeImportData(SMeterObj *pObj, SImportInfo *pImport); int vnodeImportData(SMeterObj *pObj, SImportInfo *pImport);
int vnodeGetImportStartPart(SMeterObj *pObj, char *payload, int rows, TSKEY key1) { int vnodeGetImportStartPart(SMeterObj *pObj, char *payload, int rows, TSKEY key1) {
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include "vnodeShell.h" #include "vnodeShell.h"
#include "vnodeUtil.h" #include "vnodeUtil.h"
#pragma GCC diagnostic ignored "-Wpointer-sign"
#define VALID_TIMESTAMP(key, curKey, prec) (((key) >= 0) && ((key) <= ((curKey) + 36500 * tsMsPerDay[prec]))) #define VALID_TIMESTAMP(key, curKey, prec) (((key) >= 0) && ((key) <= ((curKey) + 36500 * tsMsPerDay[prec])))
int tsMeterSizeOnFile; int tsMeterSizeOnFile;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "vnode.h" #include "vnode.h"
#include "vnodeRead.h" #include "vnodeRead.h"
#include "vnodeUtil.h" #include "vnodeUtil.h"
#pragma GCC diagnostic ignored "-Wint-conversion"
int (*pQueryFunc[])(SMeterObj *, SQuery *) = {vnodeQueryFromCache, vnodeQueryFromFile}; int (*pQueryFunc[])(SMeterObj *, SQuery *) = {vnodeQueryFromCache, vnodeQueryFromFile};
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "vnode.h" #include "vnode.h"
#include "vnodeRead.h" #include "vnodeRead.h"
#include "vnodeUtil.h" #include "vnodeUtil.h"
#pragma GCC diagnostic ignored "-Wint-conversion"
void * pShellServer = NULL; void * pShellServer = NULL;
SShellObj **shellList = NULL; SShellObj **shellList = NULL;
...@@ -216,7 +217,6 @@ int vnodeSendShellSubmitRspMsg(SShellObj *pObj, int code, int numOfPoints) { ...@@ -216,7 +217,6 @@ int vnodeSendShellSubmitRspMsg(SShellObj *pObj, int code, int numOfPoints) {
int vnodeProcessQueryRequest(char *pMsg, int msgLen, SShellObj *pObj) { int vnodeProcessQueryRequest(char *pMsg, int msgLen, SShellObj *pObj) {
int ret, code = 0; int ret, code = 0;
SMeterObj * pMeterObj = NULL;
SQueryMeterMsg * pQueryMsg; SQueryMeterMsg * pQueryMsg;
SMeterSidExtInfo **pSids = NULL; SMeterSidExtInfo **pSids = NULL;
int32_t incNumber = 0; int32_t incNumber = 0;
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include "vnodeStore.h" #include "vnodeStore.h"
#include "vnodeUtil.h" #include "vnodeUtil.h"
#pragma GCC diagnostic ignored "-Wformat-overflow="
int vnodeCreateMeterObjFile(int vnode); int vnodeCreateMeterObjFile(int vnode);
int tsMaxVnode = -1; int tsMaxVnode = -1;
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include "vnodeDataFilterFunc.h" #include "vnodeDataFilterFunc.h"
#include "vnodeUtil.h" #include "vnodeUtil.h"
#pragma GCC diagnostic ignored "-Wint-conversion"
int vnodeCheckFileIntegrity(FILE* fp) { int vnodeCheckFileIntegrity(FILE* fp) {
/* /*
int savedSessions, savedMeterSize; int savedSessions, savedMeterSize;
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "tcrc32c.h" #include "tcrc32c.h"
//todo : use the original source code //todo : use the original source code
#pragma GCC diagnostic ignored "-Wunused-function"
#define POLY 0x82f63b78 #define POLY 0x82f63b78
#define LONG_SHIFT 8192 #define LONG_SHIFT 8192
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
#define _XOPEN_SOURCE #define _XOPEN_SOURCE
#define _BSD_SOURCE #define _DEFAULT_SOURCE
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册