Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (2)
missing casts wanted by clang
· c41c0b7d
Gary E. Miller
authored
Feb 13, 2017
c41c0b7d
static found by clang
· 1cb90371
Gary E. Miller
authored
Feb 13, 2017
1cb90371
Hide whitespace changes
Inline
Side-by-side
libisc/backtrace.c
View file @
1cb90371
...
...
@@ -260,13 +260,15 @@ isc_backtrace_getsymbol(const void *addr, const char **symbolp,
* Search the table for the entry that meets:
* entry.addr <= addr < next_entry.addr.
*/
found
=
bsearch
(
addr
,
isc__backtrace_symtable
,
isc__backtrace_nsymbols
,
found
=
bsearch
(
addr
,
isc__backtrace_symtable
,
(
size_t
)
isc__backtrace_nsymbols
,
sizeof
(
isc__backtrace_symtable
[
0
]),
symtbl_compare
);
if
(
found
==
NULL
)
result
=
ISC_R_NOTFOUND
;
else
{
*
symbolp
=
found
->
symbol
;
*
offsetp
=
(
const
char
*
)
addr
-
(
char
*
)
found
->
addr
;
*
offsetp
=
(
unsigned
long
)((
const
char
*
)
addr
\
-
(
char
*
)
found
->
addr
);
}
return
(
result
);
...
...
libisc/errno2result.c
View file @
1cb90371
...
...
@@ -98,7 +98,7 @@ isc___errno2result(int posixerrno, const char *file, unsigned int line) {
return
(
ISC_R_CONNREFUSED
);
default:
ISC_IGNORE
(
strerror_r
(
posixerrno
,
strbuf
,
sizeof
(
strbuf
)));
UNEXPECTED_ERROR
(
file
,
line
,
"unable to convert errno "
UNEXPECTED_ERROR
(
file
,
(
int
)
line
,
"unable to convert errno "
"to isc_result: %d: %s"
,
posixerrno
,
strbuf
);
/*
...
...
libisc/ifiter_getifaddrs.c
View file @
1cb90371
...
...
@@ -200,22 +200,25 @@ internal_current(isc_interfaceiter_t *iter) {
iter
->
current
.
flags
|=
INTERFACE_F_MULTICAST
;
#endif
iter
->
current
.
af
=
family
;
iter
->
current
.
af
=
(
unsigned
int
)
family
;
get_addr
(
family
,
&
iter
->
current
.
address
,
ifa
->
ifa_addr
,
ifa
->
ifa_name
);
get_addr
((
unsigned
int
)
family
,
&
iter
->
current
.
address
,
ifa
->
ifa_addr
,
ifa
->
ifa_name
);
if
(
ifa
->
ifa_netmask
!=
NULL
)
get_addr
(
family
,
&
iter
->
current
.
netmask
,
ifa
->
ifa_netmask
,
get_addr
(
(
unsigned
int
)
family
,
&
iter
->
current
.
netmask
,
ifa
->
ifa_netmask
,
ifa
->
ifa_name
);
if
(
ifa
->
ifa_dstaddr
!=
NULL
&&
(
iter
->
current
.
flags
&
INTERFACE_F_POINTTOPOINT
)
!=
0
)
get_addr
(
family
,
&
iter
->
current
.
dstaddress
,
ifa
->
ifa_dstaddr
,
get_addr
((
unsigned
int
)
family
,
&
iter
->
current
.
dstaddress
,
ifa
->
ifa_dstaddr
,
ifa
->
ifa_name
);
if
(
ifa
->
ifa_broadaddr
!=
NULL
&&
(
iter
->
current
.
flags
&
INTERFACE_F_BROADCAST
)
!=
0
)
get_addr
(
family
,
&
iter
->
current
.
broadcast
,
ifa
->
ifa_broadaddr
,
get_addr
((
unsigned
int
)
family
,
&
iter
->
current
.
broadcast
,
ifa
->
ifa_broadaddr
,
ifa
->
ifa_name
);
iter
->
current
.
ifindex
=
if_nametoindex
(
iter
->
current
.
name
);
...
...
libisc/netaddr.c
View file @
1cb90371
...
...
@@ -150,7 +150,7 @@ isc_netaddr_getzone(const isc_netaddr_t *netaddr) {
void
isc_netaddr_fromsockaddr
(
isc_netaddr_t
*
t
,
const
isc_sockaddr_t
*
s
)
{
int
family
=
s
->
type
.
sa
.
sa_family
;
t
->
family
=
family
;
t
->
family
=
(
unsigned
int
)
family
;
switch
(
family
)
{
case
AF_INET
:
t
->
type
.
in
=
s
->
type
.
sin
.
sin_addr
;
...
...
tests/ntpd/leapsec.c
View file @
1cb90371
...
...
@@ -239,7 +239,7 @@ static const char leap_gthash [] = {
static
uint32_t
lsec2009
=
3439756800u
;
// 1 Jan 2009, 00:00:00 utc
static
uint32_t
lsec2012
=
3550089600u
;
// 1 Jul 2012, 00:00:00 utc
int
stringreader
(
void
*
farg
)
static
int
stringreader
(
void
*
farg
)
{
const
char
**
cpp
=
(
const
char
**
)
farg
;
if
(
**
cpp
)
...
...
@@ -942,7 +942,7 @@ TEST(leapsec, lsEmptyTableElectric) {
const
time_t
tE
=
lsec2012
+
10
;
for
(
t
=
t0
;
t
!=
tE
;
++
t
)
{
rc
=
leapsec_query
(
&
qr
,
t
,
&
pivot
);
rc
=
leapsec_query
(
&
qr
,
(
uint32_t
)
t
,
&
pivot
);
TEST_ASSERT_FALSE
(
rc
);
TEST_ASSERT_EQUAL
(
0
,
qr
.
warped
);
TEST_ASSERT_EQUAL
(
LSPROX_NOWARN
,
qr
.
proximity
);
...
...