Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - Software
Project
Project
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
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC DEL 1ns 4cha - Software
Commits
718f35cf
Commit
718f35cf
authored
May 20, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oldtools: fix compiler warning/errors
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
a454f72a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
19 deletions
+21
-19
fd-raw-gettime.c
oldtools/fd-raw-gettime.c
+1
-1
fd-raw-input.c
oldtools/fd-raw-input.c
+13
-12
fd-raw-output.c
oldtools/fd-raw-output.c
+1
-1
fd-raw-perf.c
oldtools/fd-raw-perf.c
+5
-4
fd-raw-settime.c
oldtools/fd-raw-settime.c
+1
-1
No files found.
oldtools/fd-raw-gettime.c
View file @
718f35cf
...
...
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
err
++
;
}
if
(
err
)
{
fprintf
(
stderr
,
"%s: got %i errors reading %
i
attributes
\n
"
,
fprintf
(
stderr
,
"%s: got %i errors reading %
zu
attributes
\n
"
,
argv
[
0
],
err
,
ARRAY_SIZE
(
words
));
}
printf
(
"%i.%09li
\n
"
,
words
[
1
].
val
,
(
long
)
words
[
2
].
val
*
8
);
...
...
oldtools/fd-raw-input.c
View file @
718f35cf
...
...
@@ -18,6 +18,7 @@
#include <errno.h>
#include <fcntl.h>
#include <time.h>
#include <inttypes.h>
#include <sys/time.h>
#include <sys/select.h>
#include <sys/types.h>
...
...
@@ -98,18 +99,18 @@ void event(uint32_t *a, char *name, int *seq, int modemask, long double *t1,
if
(
delta
<
0
)
delta
+=
1000LL
*
1000
*
1000
*
1000
;
if
(
*
p1
)
{
printf
(
" %012lli - delta %012lli
"
,
p2
,
delta
);
if
(
expect
)
{
guess
+=
expect
;
if
(
guess
>
1000LL
*
1000
*
1000
*
1000
)
guess
-=
1000LL
*
1000
*
1000
*
1000
;
printf
(
" - error %6i"
,
(
int
)(
p2
-
guess
));
}
putchar
(
'\n'
);
printf
(
" %012"
PRIu64
" - delta %012"
PRIu64
"
"
,
p2
,
delta
);
if
(
expect
)
{
guess
+=
expect
;
if
(
guess
>
1000LL
*
1000
*
1000
*
1000
)
guess
-=
1000LL
*
1000
*
1000
*
1000
;
printf
(
" - error %6i"
,
(
int
)(
p2
-
guess
));
}
putchar
(
'\n'
);
}
else
{
printf
(
" %012lli
\n
"
,
p2
);
if
(
expect
)
printf
(
" %012"
PRIu64
"
\n
"
,
p2
);
if
(
expect
)
guess
=
p2
;
}
*
p1
=
p2
;
...
...
@@ -229,8 +230,8 @@ int main(int argc, char **argv)
/* Ok, it's there: read and decode */
j
=
read
(
fd
[
i
],
&
ctrl
,
sizeof
(
ctrl
));
if
(
j
!=
sizeof
(
ctrl
))
{
fprintf
(
stderr
,
"%s: read(): got %i not %i
\n
"
,
argv
[
0
],
j
,
sizeof
(
ctrl
));
fprintf
(
stderr
,
"%s: read(): got %i not %zu
\n
"
,
argv
[
0
],
j
,
sizeof
(
ctrl
));
exit
(
1
);
}
attrs
=
ctrl
.
attr_channel
.
ext_val
;
...
...
oldtools/fd-raw-output.c
View file @
718f35cf
...
...
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
glob
(
"/dev/zio/zio-fd-*-1-0-ctrl"
,
GLOB_APPEND
,
NULL
,
&
glob_buf
);
if
(
glob_buf
.
gl_pathc
!=
1
)
{
fprintf
(
stderr
,
"%s: found %
i
devices, need 1 only
\n
"
,
fprintf
(
stderr
,
"%s: found %
zu
devices, need 1 only
\n
"
,
argv
[
0
],
glob_buf
.
gl_pathc
);
exit
(
1
);
}
...
...
oldtools/fd-raw-perf.c
View file @
718f35cf
...
...
@@ -18,6 +18,7 @@
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <sys/time.h>
#include <sys/select.h>
#include <sys/types.h>
...
...
@@ -69,8 +70,8 @@ static void perf_one(struct fd_perf *p, uint32_t *a /* attrs */)
/* count hardware-reported pico */
diff
=
pico
-
p
->
pico_prev
;
if
(
0
)
{
printf
(
"%lli
= %f - %f
\n
"
,
diff
,
pico
/
1000000
.
0
,
p
->
pico_prev
/
1000000
.
0
);
printf
(
"%"
PRIi64
"
= %f - %f
\n
"
,
diff
,
pico
/
1000000
.
0
,
p
->
pico_prev
/
1000000
.
0
);
}
if
(
diff
<
0
)
diff
+=
1000LL
*
1000
*
1000
*
1000
;
...
...
@@ -107,7 +108,7 @@ static void perf_report_clean(struct fd_perf *p)
printf
(
"%i pulses (%i lost)
\n
"
,
p
->
nev
,
p
->
lost
);
printf
(
" hw: %
llips (%fkHz) -- min %lli max %lli delta %lli
\n
"
,
printf
(
" hw: %
"
PRIi64
"ps (%fkHz) -- min %"
PRIi64
" max %"
PRIi64
" delta %"
PRIi64
"
\n
"
,
p
->
pico_avg
,
1000
.
0
*
1000
*
1000
/
p
->
pico_avg
,
p
->
pico_min
,
p
->
pico_max
,
p
->
pico_max
-
p
->
pico_min
);
printf
(
" sw: %ius (%fkHz) -- min %i max %i delta %i
\n
"
,
...
...
@@ -208,7 +209,7 @@ int main(int argc, char **argv)
/* Ok, it's there: read and decode */
j
=
read
(
fd
[
i
],
&
ctrl
,
sizeof
(
ctrl
));
if
(
j
!=
sizeof
(
ctrl
))
{
fprintf
(
stderr
,
"%s: read(): got %i not %
i
\n
"
,
fprintf
(
stderr
,
"%s: read(): got %i not %
zu
\n
"
,
argv
[
0
],
j
,
sizeof
(
ctrl
));
exit
(
1
);
}
...
...
oldtools/fd-raw-settime.c
View file @
718f35cf
...
...
@@ -72,7 +72,7 @@ int main(int argc, char **argv)
err
++
;
}
if
(
err
)
{
fprintf
(
stderr
,
"%s: got %i errors writing %
i
attributes
\n
"
,
fprintf
(
stderr
,
"%s: got %i errors writing %
zu
attributes
\n
"
,
argv
[
0
],
err
,
ARRAY_SIZE
(
words
));
}
return
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