Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
146be33c
Unverified
Commit
146be33c
authored
Feb 18, 2019
by
Rémi Verschelde
Committed by
GitHub
Feb 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #26027 from marxin/fix-werrors-with-all
Fix warnings seen with warnings=all and recent GCC 8.2.
parents
0fa3b808
155cbe0b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
21 deletions
+25
-21
object.cpp
core/object.cpp
+14
-16
main.cpp
main/main.cpp
+10
-4
lws_peer.cpp
modules/websocket/lws_peer.cpp
+1
-1
No files found.
core/object.cpp
View file @
146be33c
...
...
@@ -703,40 +703,38 @@ Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Vari
}
#ifdef DEBUG_ENABLED
static
bool
_test_call_error
(
const
StringName
&
p_func
,
const
Variant
::
CallError
&
error
)
{
static
void
_test_call_error
(
const
StringName
&
p_func
,
const
Variant
::
CallError
&
error
)
{
switch
(
error
.
error
)
{
case
Variant
:
:
CallError
::
CALL_OK
:
return
true
;
case
Variant
:
:
CallError
::
CALL_ERROR_INVALID_METHOD
:
return
false
;
break
;
case
Variant
:
:
CallError
::
CALL_ERROR_INVALID_ARGUMENT
:
{
ERR_EXPLAIN
(
"Error Calling Function: "
+
String
(
p_func
)
+
" - Invalid type for argument "
+
itos
(
error
.
argument
)
+
", expected "
+
Variant
::
get_type_name
(
error
.
expected
));
ERR_FAIL_V
(
true
);
}
break
;
ERR_FAIL
();
break
;
}
case
Variant
:
:
CallError
::
CALL_ERROR_TOO_MANY_ARGUMENTS
:
{
ERR_EXPLAIN
(
"Error Calling Function: "
+
String
(
p_func
)
+
" - Too many arguments, expected "
+
itos
(
error
.
argument
));
ERR_FAIL
_V
(
true
);
}
break
;
ERR_FAIL
(
);
break
;
}
case
Variant
:
:
CallError
::
CALL_ERROR_TOO_FEW_ARGUMENTS
:
{
ERR_EXPLAIN
(
"Error Calling Function: "
+
String
(
p_func
)
+
" - Too few arguments, expected "
+
itos
(
error
.
argument
));
ERR_FAIL
_V
(
true
);
}
break
;
case
Variant
:
:
CallError
::
CALL_ERROR_INSTANCE_IS_NULL
:
{
}
//?
ERR_FAIL
(
);
break
;
}
case
Variant
:
:
CallError
::
CALL_ERROR_INSTANCE_IS_NULL
:
break
;
}
return
true
;
}
#else
#define _test_call_error(m_str, m_err)
((m_err.error == Variant::CallError::CALL_ERROR_INVALID_METHOD) ? false : true)
#define _test_call_error(m_str, m_err)
#endif
...
...
main/main.cpp
View file @
146be33c
...
...
@@ -394,7 +394,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
Vector
<
String
>
breakpoints
;
bool
use_custom_res
=
true
;
bool
force_res
=
false
;
#ifdef TOOLS_ENABLED
bool
found_project
=
false
;
#endif
packed_data
=
PackedData
::
get_singleton
();
if
(
!
packed_data
)
...
...
@@ -746,7 +748,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
if
(
globals
->
setup
(
project_path
,
main_pack
,
upwards
)
==
OK
)
{
#ifdef TOOLS_ENABLED
found_project
=
true
;
#endif
}
else
{
#ifdef TOOLS_ENABLED
...
...
@@ -1273,7 +1277,9 @@ bool Main::start() {
bool
hasicon
=
false
;
String
doc_tool
;
List
<
String
>
removal_docs
;
#ifdef TOOLS_ENABLED
bool
doc_base
=
true
;
#endif
String
game_path
;
String
script
;
String
test
;
...
...
@@ -1286,9 +1292,11 @@ bool Main::start() {
List
<
String
>
args
=
OS
::
get_singleton
()
->
get_cmdline_args
();
for
(
int
i
=
0
;
i
<
args
.
size
();
i
++
)
{
//parameters that do not have an argument to the right
if
(
args
[
i
]
==
"--
no-docbase
"
)
{
doc_base
=
fals
e
;
if
(
args
[
i
]
==
"--
check-only
"
)
{
check_only
=
tru
e
;
#ifdef TOOLS_ENABLED
}
else
if
(
args
[
i
]
==
"--no-docbase"
)
{
doc_base
=
false
;
}
else
if
(
args
[
i
]
==
"-e"
||
args
[
i
]
==
"--editor"
)
{
editor
=
true
;
}
else
if
(
args
[
i
]
==
"-p"
||
args
[
i
]
==
"--project-manager"
)
{
...
...
@@ -1296,8 +1304,6 @@ bool Main::start() {
#endif
}
else
if
(
args
[
i
].
length
()
&&
args
[
i
][
0
]
!=
'-'
&&
game_path
==
""
)
{
game_path
=
args
[
i
];
}
else
if
(
args
[
i
]
==
"--check-only"
)
{
check_only
=
true
;
}
//parameters that have an argument to the right
else
if
(
i
<
(
args
.
size
()
-
1
))
{
...
...
modules/websocket/lws_peer.cpp
View file @
146be33c
...
...
@@ -102,7 +102,7 @@ Error LWSPeer::write_wsi() {
return
OK
;
int
read
=
0
;
uint8_t
is_string
;
uint8_t
is_string
=
0
;
PoolVector
<
uint8_t
>::
Write
rw
=
_packet_buffer
.
write
();
_out_buffer
.
read_packet
(
&
(
rw
[
LWS_PRE
]),
_packet_buffer
.
size
()
-
LWS_PRE
,
&
is_string
,
read
);
...
...
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