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

Clean up some warnings

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