Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
7e5abcf8
Commit
7e5abcf8
authored
Jun 06, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/tools: fix compiler warnings
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
57a1e930
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
rtu_stat.c
userspace/tools/rtu_stat.c
+2
-1
shw_ver.c
userspace/tools/shw_ver.c
+1
-1
wr_mon.c
userspace/tools/wr_mon.c
+2
-2
wr_phytool.c
userspace/tools/wr_phytool.c
+6
-5
No files found.
userspace/tools/rtu_stat.c
View file @
7e5abcf8
...
...
@@ -63,7 +63,7 @@ int rtudexp_add_entry(const char *eha, int port, int mode)
int
fetch_rtu_fd
(
rtudexp_fd_entry_t
*
d
,
int
*
n_entries
)
void
fetch_rtu_fd
(
rtudexp_fd_entry_t
*
d
,
int
*
n_entries
)
{
int
start
=
0
,
n
=
0
;
rtudexp_fd_list_t
list
;
...
...
@@ -213,4 +213,5 @@ int main(int argc, char **argv)
printf
(
"-
\n
"
);
}
printf
(
"
\n
"
);
return
0
;
}
userspace/tools/shw_ver.c
View file @
7e5abcf8
...
...
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
}
else
func
=
'a'
;
assert_init
(
shw_pio_mmap_init
());
assert_init
(
shw_pio_mmap_init
());
shw_io_init
();
shw_io_configure_all
();
...
...
userspace/tools/wr_mon.c
View file @
7e5abcf8
...
...
@@ -158,7 +158,7 @@ void show_screen()
show_servo
();
}
main
()
int
main
()
{
init
();
...
...
@@ -187,5 +187,5 @@ main()
term_cprintf
(
C_GREY
,
"bye...
\n\n
"
);
term_clear
();
term_restore
();
return
0
;
}
userspace/tools/wr_phytool.c
View file @
7e5abcf8
...
...
@@ -20,6 +20,7 @@
#include <sys/mman.h>
#include <signal.h>
#define __EXPORTED_HEADERS__
/* prevent a #warning notice from linux/types.h */
#include <linux/mii.h>
#include <regs/endpoint-regs.h>
...
...
@@ -96,7 +97,7 @@ void dump_pcs_regs(int ep, int argc, char *argv[])
void
write_pcs_reg
(
int
ep
,
int
argc
,
char
*
argv
[])
{
int
i
,
reg
,
data
;
int
reg
,
data
;
sscanf
(
argv
[
3
],
"%x"
,
&
reg
);
sscanf
(
argv
[
4
],
"%x"
,
&
data
);
pcs_write
(
ep
,
reg
,
data
);
...
...
@@ -218,7 +219,7 @@ void calc_trans(int ep, int argc, char *argv[])
wr_timestamp_t
ts_tx
,
ts_rx
;
wr_socket_t
*
sock
;
FILE
*
f_log
=
NULL
;
wr_sockaddr_t
sock_addr
,
to
,
from
;
wr_sockaddr_t
sock_addr
,
from
;
int
bitslide
,
phase
,
i
;
signal
(
SIGINT
,
sighandler
);
...
...
@@ -335,7 +336,7 @@ void pps_adjustment_test(int ep, int argc, char *argv[])
{
wr_timestamp_t
ts_tx
,
ts_rx
;
wr_socket_t
*
sock
;
wr_sockaddr_t
sock_addr
,
to
,
from
;
wr_sockaddr_t
sock_addr
,
from
;
int
adjust_count
=
0
;
signal
(
SIGINT
,
sighandler
);
...
...
@@ -368,7 +369,7 @@ void pps_adjustment_test(int ep, int argc, char *argv[])
// if(!ptpd_netif_adjust_in_progress())
{
ptpd_netif_sendto
(
sock
,
&
to
,
buf
,
64
,
&
ts_tx
);
int
n
=
ptpd_netif_recvfrom
(
sock
,
&
from
,
buf
,
64
,
&
ts_rx
);
ptpd_netif_recvfrom
(
sock
,
&
from
,
buf
,
64
,
&
ts_rx
);
printf
(
"TX timestamp: correct %d %12lld:%12d
\n
"
,
ts_tx
.
correct
,
ts_tx
.
sec
,
ts_tx
.
nsec
);
printf
(
"RX timestamp: correct %d %12lld:%12d
\n
"
,
ts_rx
.
correct
,
ts_rx
.
sec
,
ts_rx
.
nsec
);
adjust_count
--
;
...
...
@@ -387,7 +388,7 @@ void rt_command(int ep, int argc, char *argv[])
if
(
rts_connect
()
<
0
)
{
printf
(
"Can't connect to the RT subsys
\n
"
);
return
-
1
;
return
;
}
if
(
halexp_client_init
()
<
0
)
...
...
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