Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
96035b37
Commit
96035b37
authored
Jan 30, 2016
by
Matthias Braun
Browse files
Fix warnings in unittest
parent
e585022c
Changes
1
Hide whitespace changes
Inline
Side-by-side
unittests/tarval_calc.c
View file @
96035b37
...
...
@@ -44,27 +44,27 @@ static void compare_tv(const char *file, unsigned line,
}
#define TVS_EQUAL(val0,val1) compare_tv(__FILE__, __LINE__, #val0, val0, #val1, val1)
typedef
ir_tarval
*
(
*
binop
)(
ir_tarval
*
op0
,
ir_tarval
*
op1
);
typedef
ir_tarval
*
(
*
unop
)(
ir_tarval
*
op
);
typedef
ir_tarval
*
(
*
binop
)(
ir_tarval
const
*
op0
,
ir_tarval
const
*
op1
);
typedef
ir_tarval
*
(
*
unop
)(
ir_tarval
const
*
op
);
/* tarval_div, except that x/0 == 0 */
static
ir_tarval
*
safe_div
(
ir_tarval
*
op0
,
ir_tarval
*
op1
)
static
ir_tarval
*
safe_div
(
ir_tarval
const
*
op0
,
ir_tarval
const
*
op1
)
{
if
(
tarval_is_null
(
op1
))
return
op1
;
return
(
ir_tarval
*
)
op1
;
return
tarval_div
(
op0
,
op1
);
}
static
ir_tarval
*
safe_mod
(
ir_tarval
*
op0
,
ir_tarval
*
op1
)
static
ir_tarval
*
safe_mod
(
ir_tarval
const
*
op0
,
ir_tarval
const
*
op1
)
{
if
(
tarval_is_null
(
op1
))
return
op1
;
return
(
ir_tarval
*
)
op1
;
return
tarval_mod
(
op0
,
op1
);
}
static
ir_tarval
*
tarval_id
(
ir_tarval
*
tv
)
static
ir_tarval
*
tarval_id
(
ir_tarval
const
*
tv
)
{
return
tv
;
return
(
ir_tarval
*
)
tv
;
}
static
void
test_neutral_
(
binop
op
,
const
char
*
new_op_name
,
...
...
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