Skip to content

Commit 95b7e6f

Browse files
committed
fixed:code ql scan problem
1 parent 444b4a9 commit 95b7e6f

13 files changed

Lines changed: 27 additions & 18 deletions

File tree

‎.github/workflows/Ubuntu_build.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- 'XEngine_Source/**'
99
- 'XEngine_Release/**'
1010
- '.github/**'
11+
12+
permissions:
13+
contents: read
1114

1215
jobs:
1316
build:

‎.github/workflows/macbuild.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- 'XEngine_Source/**'
99
- 'XEngine_Release/**'
1010
- '.github/**'
11+
12+
13+
permissions:
14+
contents: read
1115

1216
jobs:
1317
build:

‎.github/workflows/msbuild.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- 'XEngine_Source/**'
99
- 'XEngine_Release/**'
1010
- '.github/**'
11+
12+
permissions:
13+
contents: read
1114

1215
jobs:
1316
build:

‎.github/workflows/release.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- master
77

8+
permissions:
9+
contents: write
10+
actions: read
11+
812
jobs:
913
build:
1014
runs-on: ubuntu-latest

‎XEngine_Source/MQCore_ConfigModule/pch.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <tchar.h>
1414
#else
1515
#endif
16-
#endif //PCH_H
1716
#include <stdio.h>
1817
#include <stdlib.h>
1918
#include <string.h>
@@ -58,4 +57,5 @@ extern XLONG Config_dwErrorCode;
5857
#pragma comment(lib,"../Release/jsoncpp")
5958
#endif
6059
#endif
61-
#endif
60+
#endif
61+
#endif //PCH_H

‎XEngine_Source/MQCore_DBModule/pch.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "framework.h"
1313
#include <tchar.h>
1414
#endif
15-
#endif //PCH_H
1615
#include <stdio.h>
1716
#include <stdlib.h>
1817
#include <string.h>
@@ -66,4 +65,5 @@ extern XLONG DBModule_dwErrorCode;
6665
#pragma comment(lib,"../Release/MQCore_MemoryCache.lib")
6766
#endif
6867
#endif
69-
#endif
68+
#endif
69+
#endif //PCH_H

‎XEngine_Source/MQCore_HelpModule/pch.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#ifdef _MSC_BUILD
1212
#include "framework.h"
1313
#endif
14-
#endif //PCH_H
1514
#include <stdio.h>
1615
#include <stdlib.h>
1716
#include <string.h>
@@ -36,4 +35,6 @@
3635
// History:
3736
*********************************************************************/
3837
extern bool APIHelp_IsErrorOccur;
39-
extern XLONG APIHelp_dwErrorCode;
38+
extern XLONG APIHelp_dwErrorCode;
39+
40+
#endif //PCH_H

‎XEngine_Source/MQCore_MemoryCache/pch.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// 添加要在此处预编译的标头
1212
#include "framework.h"
1313
#endif
14-
#endif //PCH_H
1514
#include <stdio.h>
1615
#include <stdlib.h>
1716
#include <string.h>
@@ -47,4 +46,5 @@ extern XLONG MemoryCache_dwErrorCode;
4746

4847
#ifdef _MSC_BUILD
4948
#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_DataBase.lib")
50-
#endif
49+
#endif
50+
#endif //PCH_H

‎XEngine_Source/MQCore_ProtocolModule/ProtocolModule_Packet/ProtocolModule_Packet.cpp‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,9 +814,7 @@ bool CProtocolModule_Packet::ProtocolModule_Packet_MQTTCommon(XENGINE_PROTOCOLHD
814814
{
815815
if (0 == pSt_ProtocolHdr->wReserve)
816816
{
817-
int nRVLen = 0;
818817
int nListCount = 6;
819-
XCHAR tszRVBuffer[1024];
820818
MQTTPROTOCOL_HDRPROPERTY** ppSt_HDRProperty;
821819

822820
BaseLib_Memory_Malloc((XPPPMEM)&ppSt_HDRProperty, nListCount, sizeof(MQTTPROTOCOL_HDRPROPERTY));

‎XEngine_Source/MQCore_ProtocolModule/pch.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "framework.h"
1313
#include <tchar.h>
1414
#endif
15-
#endif //PCH_H
1615
#include <string.h>
1716
#include <memory>
1817
#include <json/json.h>
@@ -66,4 +65,5 @@ extern XLONG Protocol_dwErrorCode;
6665
#pragma comment(lib,"../Release/jsoncpp")
6766
#endif
6867
#endif
69-
#endif
68+
#endif
69+
#endif //PCH_H

0 commit comments

Comments
 (0)