Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
fac610ac
Commit
fac610ac
authored
Feb 01, 2017
by
Alexandre Duret-Lutz
Browse files
ltsmin: fix function pointer casts for -Wpedantic
* spot/ltsmin/ltsmin.cc: Here.
parent
43d57da7
Changes
1
Hide whitespace changes
Inline
Side-by-side
spot/ltsmin/ltsmin.cc
View file @
fac610ac
...
...
@@ -1040,7 +1040,11 @@ namespace spot
auto
sym
=
[
&
](
const
char
*
name
)
{
auto
res
=
lt_dlsym
(
h
,
name
);
// Work around -Wpendantic complaining that pointer-to-objects
// should not be converted to pointer-to-functions (we have to
// assume they can for POSIX).
void
(
*
res
)(
void
*
);
*
reinterpret_cast
<
void
**>
(
&
res
)
=
lt_dlsym
(
h
,
name
);
if
(
res
==
nullptr
)
throw
std
::
runtime_error
(
std
::
string
(
"Failed to resolve symbol '"
)
+
name
+
"' in '"
+
file
+
"'."
);
...
...
@@ -1074,7 +1078,7 @@ namespace spot
{
d
->
get_initial_state
=
(
void
(
*
)(
void
*
))
sym
(
"get_initial_state"
);
d
->
have_property
=
(
int
(
*
)())
*
reinterpret_cast
<
void
**>
(
&
d
->
have_property
)
=
lt_dlsym
(
h
,
"have_property"
);
d
->
get_successors
=
(
int
(
*
)(
void
*
,
int
*
,
TransitionCB
,
void
*
))
sym
(
"get_successors"
);
...
...
Write
Preview
Supports
Markdown
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