Skip to content

Commit 9c9fb94

Browse files
Cleared code analysis warnings for boost and antlr4 runtime
1 parent ab9a1ff commit 9c9fb94

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

src/lib/CommonTypes.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@
2828
#include <cstddef>
2929
#include <map>
3030
#include <unordered_map>
31+
32+
// Reduce boost code analysis warnings
33+
#pragma warning(push)
34+
#pragma warning(disable:6001)
35+
#pragma warning(disable:6031)
36+
#pragma warning(disable:6255)
37+
#pragma warning(disable:6258)
38+
#pragma warning(disable:6387)
39+
#pragma warning(disable:26439)
40+
#pragma warning(disable:26444)
41+
#pragma warning(disable:26451)
42+
#pragma warning(disable:26495)
43+
#pragma warning(disable:26498)
44+
#pragma warning(disable:26812)
45+
3146
#include <boost/any.hpp>
3247
#include <boost/uuid/uuid.hpp>
3348
#include <boost/exception/exception.hpp>
@@ -42,6 +57,8 @@
4257
#include <boost/iostreams/filter/gzip.hpp>
4358
#include <boost/iostreams/device/array.hpp>
4459

60+
#pragma warning(pop)
61+
4562
#if _WIN32 || _WIN64
4663
#if _WIN64
4764
#define _32BIT 0

src/lib/filterexpressions/FilterExpressions.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,15 @@
3434
static const Ref<dfa::DFAState> ERROR;
3535
*/
3636

37+
// Reduce antlr4 runtime code analysis warnings
38+
#pragma warning(push)
39+
#pragma warning(disable:26439)
40+
#pragma warning(disable:26444)
41+
3742
#include "FilterExpressionSyntaxBaseListener.h"
3843

44+
#pragma warning(pop)
45+
3946
// For some reason this symbol gets undefined? So, we re-define it...
4047
#ifndef EOF
4148
#define EOF (-1)

src/samples/FilterExpressionTests/FilterExpressionTests.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
//
2222
//******************************************************************************************************
2323

24+
#pragma warning(disable:26451)
25+
#pragma warning(disable:26812)
26+
#pragma warning(disable:26444)
27+
2428
#include <iostream>
2529
#include <string>
2630
#include <fstream>

0 commit comments

Comments
 (0)