Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
781fb4d0
Commit
781fb4d0
authored
Jul 10, 2009
by
Jesse Beder
Browse files
Fixed warnings to compile on gcc with -Wall -pedantic -Wextra
parent
b113c378
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
12 deletions
+12
-12
CMakeLists.txt
CMakeLists.txt
+1
-1
include/emittermanip.h
include/emittermanip.h
+1
-1
src/alias.cpp
src/alias.cpp
+2
-2
src/emitterstate.h
src/emitterstate.h
+1
-1
src/node.cpp
src/node.cpp
+2
-2
src/scalar.cpp
src/scalar.cpp
+2
-2
src/token.h
src/token.h
+2
-2
yaml-reader/main.cpp
yaml-reader/main.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
781fb4d0
...
...
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6)
project
(
YAML_CPP
)
SET
(
CMAKE_CXX_FLAGS
"-O2"
)
SET
(
CMAKE_CXX_FLAGS
"-O2
-Wall -pedantic -Wextra
"
)
enable_testing
()
...
...
include/emittermanip.h
View file @
781fb4d0
...
...
@@ -43,7 +43,7 @@ namespace YAML
// Flow, // duplicate
// Block, // duplicate
// Auto, // duplicate
LongKey
,
LongKey
};
struct
_Indent
{
...
...
src/alias.cpp
View file @
781fb4d0
...
...
@@ -9,11 +9,11 @@ namespace YAML
{
}
void
Alias
::
Parse
(
Scanner
*
pScanner
,
const
ParserState
&
state
)
void
Alias
::
Parse
(
Scanner
*/
*
pScanner
*/
,
const
ParserState
&
/*
state
*/
)
{
}
void
Alias
::
Write
(
std
::
ostream
&
out
,
int
indent
,
bool
startedLine
,
bool
onlyOneCharOnLine
)
void
Alias
::
Write
(
std
::
ostream
&
out
,
int
/*
indent
*/
,
bool
/*
startedLine
*/
,
bool
/*
onlyOneCharOnLine
*/
)
{
out
<<
"
\n
"
;
}
...
...
src/emitterstate.h
View file @
781fb4d0
...
...
@@ -63,7 +63,7 @@ namespace YAML
ES_DONE_WITH_FLOW_MAP_KEY
,
ES_WAITING_FOR_FLOW_MAP_VALUE
,
ES_WRITING_FLOW_MAP_VALUE
,
ES_DONE_WITH_FLOW_MAP_VALUE
,
ES_DONE_WITH_FLOW_MAP_VALUE
};
class
EmitterState
...
...
src/node.cpp
View file @
781fb4d0
...
...
@@ -128,7 +128,7 @@ namespace YAML
pScanner
->
pop
();
}
void
Node
::
ParseAnchor
(
Scanner
*
pScanner
,
const
ParserState
&
state
)
void
Node
::
ParseAnchor
(
Scanner
*
pScanner
,
const
ParserState
&
/*
state
*/
)
{
Token
&
token
=
pScanner
->
peek
();
if
(
m_anchor
!=
""
)
...
...
@@ -139,7 +139,7 @@ namespace YAML
pScanner
->
pop
();
}
void
Node
::
ParseAlias
(
Scanner
*
pScanner
,
const
ParserState
&
state
)
void
Node
::
ParseAlias
(
Scanner
*
pScanner
,
const
ParserState
&
/*
state
*/
)
{
Token
&
token
=
pScanner
->
peek
();
if
(
m_anchor
!=
""
)
...
...
src/scalar.cpp
View file @
781fb4d0
...
...
@@ -15,14 +15,14 @@ namespace YAML
{
}
void
Scalar
::
Parse
(
Scanner
*
pScanner
,
const
ParserState
&
state
)
void
Scalar
::
Parse
(
Scanner
*
pScanner
,
const
ParserState
&
/*
state
*/
)
{
Token
&
token
=
pScanner
->
peek
();
m_data
=
token
.
value
;
pScanner
->
pop
();
}
void
Scalar
::
Write
(
std
::
ostream
&
out
,
int
indent
,
bool
startedLine
,
bool
onlyOneCharOnLine
)
void
Scalar
::
Write
(
std
::
ostream
&
out
,
int
/*
indent
*/
,
bool
/*
startedLine
*/
,
bool
/*
onlyOneCharOnLine
*/
)
{
out
<<
"
\"
"
;
for
(
unsigned
i
=
0
;
i
<
m_data
.
size
();
i
++
)
{
...
...
src/token.h
View file @
781fb4d0
...
...
@@ -25,7 +25,7 @@ namespace YAML
TT_ANCHOR
,
TT_ALIAS
,
TT_TAG
,
TT_SCALAR
,
TT_SCALAR
};
const
std
::
string
TokenNames
[]
=
{
...
...
@@ -46,7 +46,7 @@ namespace YAML
"ANCHOR"
,
"ALIAS"
,
"TAG"
,
"SCALAR"
,
"SCALAR"
};
struct
Token
{
...
...
yaml-reader/main.cpp
View file @
781fb4d0
#include "tests.h"
int
main
(
int
argc
,
char
**
argv
)
int
main
()
{
#ifdef WINDOWS
_CrtSetDbgFlag
(
_CRTDBG_LEAK_CHECK_DF
|
_CRTDBG_ALLOC_MEM_DF
);
...
...
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