Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bpftrace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bpftrace
Commits
6a031d2e
Commit
6a031d2e
authored
Jan 09, 2017
by
Alastair Robertson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable more compiler warnings
parent
9259e949
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
src/CMakeLists.txt
src/CMakeLists.txt
+17
-0
src/ast.h
src/ast.h
+2
-2
src/semantic_analyser.cpp
src/semantic_analyser.cpp
+2
-2
No files found.
src/CMakeLists.txt
View file @
6a031d2e
cmake_minimum_required
(
VERSION 2.8.12
)
cmake_minimum_required
(
VERSION 2.8.12
)
project
(
bpftrace
)
project
(
bpftrace
)
add_compile_options
(
"-std=c++14"
)
add_compile_options
(
"-Wall"
)
add_compile_options
(
"-Wextra"
)
add_compile_options
(
"-Wundef"
)
add_compile_options
(
"-Wpointer-arith"
)
add_compile_options
(
"-Wcast-align"
)
add_compile_options
(
"-Wwrite-strings"
)
add_compile_options
(
"-Wcast-qual"
)
add_compile_options
(
"-Wswitch-default"
)
add_compile_options
(
"-Wswitch-enum"
)
add_compile_options
(
"-Wconversion"
)
add_compile_options
(
"-Wunreachable-code"
)
add_compile_options
(
"-Wformat=2"
)
add_compile_options
(
"-Wstrict-overflow=5"
)
add_compile_options
(
"-Wdisabled-optimization"
)
add_compile_options
(
"-pedantic"
)
find_package
(
BISON REQUIRED
)
find_package
(
BISON REQUIRED
)
find_package
(
FLEX REQUIRED
)
find_package
(
FLEX REQUIRED
)
find_package
(
LLVM REQUIRED CONFIG
)
find_package
(
LLVM REQUIRED CONFIG
)
...
...
src/ast.h
View file @
6a031d2e
...
@@ -114,9 +114,9 @@ public:
...
@@ -114,9 +114,9 @@ public:
class
Probe
:
public
Node
{
class
Probe
:
public
Node
{
public:
public:
Probe
(
std
::
string
&
type
,
std
::
string
&
attach_point
,
StatementList
*
stmts
)
Probe
(
std
::
string
&
type
,
std
::
string
&
attach_point
,
StatementList
*
stmts
)
:
type
(
type
),
attach_point
(
attach_point
),
pred
(
nullptr
),
stmts
(
stmts
),
name
(
type
+
":"
+
attach_point
)
{
}
:
type
(
type
),
attach_point
(
attach_point
),
name
(
type
+
":"
+
attach_point
),
pred
(
nullptr
),
stmts
(
stmts
)
{
}
Probe
(
std
::
string
&
type
,
std
::
string
&
attach_point
,
Predicate
*
pred
,
StatementList
*
stmts
)
Probe
(
std
::
string
&
type
,
std
::
string
&
attach_point
,
Predicate
*
pred
,
StatementList
*
stmts
)
:
type
(
type
),
attach_point
(
attach_point
),
pred
(
pred
),
stmts
(
stmts
),
name
(
type
+
":"
+
attach_point
)
{
}
:
type
(
type
),
attach_point
(
attach_point
),
name
(
type
+
":"
+
attach_point
),
pred
(
pred
),
stmts
(
stmts
)
{
}
std
::
string
type
;
std
::
string
type
;
std
::
string
attach_point
;
std
::
string
attach_point
;
...
...
src/semantic_analyser.cpp
View file @
6a031d2e
...
@@ -10,7 +10,7 @@ namespace ast {
...
@@ -10,7 +10,7 @@ namespace ast {
using
ebpf
::
bpftrace
::
typestr
;
using
ebpf
::
bpftrace
::
typestr
;
void
SemanticAnalyser
::
visit
(
Integer
&
integer
)
void
SemanticAnalyser
::
visit
(
Integer
&
)
{
{
type_
=
Type
::
integer
;
type_
=
Type
::
integer
;
}
}
...
@@ -30,7 +30,7 @@ void SemanticAnalyser::visit(Builtin &builtin)
...
@@ -30,7 +30,7 @@ void SemanticAnalyser::visit(Builtin &builtin)
void
SemanticAnalyser
::
visit
(
Call
&
call
)
void
SemanticAnalyser
::
visit
(
Call
&
call
)
{
{
int
nargs
=
0
;
std
::
vector
<
Expression
*>::
size_type
nargs
=
0
;
if
(
call
.
vargs
)
{
if
(
call
.
vargs
)
{
nargs
=
call
.
vargs
->
size
();
nargs
=
call
.
vargs
->
size
();
for
(
Expression
*
expr
:
*
call
.
vargs
)
{
for
(
Expression
*
expr
:
*
call
.
vargs
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment