Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha
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 ADC 100M 14b 4cha
Commits
e03fafa5
Commit
e03fafa5
authored
Nov 18, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: cppcheck fixes in tools
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
b469bcce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
fau-acq-time.c
software/tools/fau-acq-time.c
+1
-2
fau-trg-config.c
software/tools/fau-trg-config.c
+3
-3
parport-burst.c
software/tools/parport-burst.c
+6
-1
No files found.
software/tools/fau-acq-time.c
View file @
e03fafa5
...
...
@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
{
"help"
,
no_argument
,
0
,
'h'
},
{
0
,
0
,
0
,
0
}
};
int
opt_index
=
0
,
err
=
0
;
int
opt_index
=
0
,
err
;
char
c
;
long
time1
[
3
],
time2
[
3
];
...
...
@@ -139,7 +139,6 @@ int main(int argc, char *argv[])
if
(
c
==
'h'
)
{
fau_help
();
exit
(
1
);
break
;
}
if
(
c
==
'V'
)
{
print_version
(
argv
[
0
]);
...
...
software/tools/fau-trg-config.c
View file @
e03fafa5
...
...
@@ -57,7 +57,7 @@ int fau_write_attribute(enum fau_attribute attr, uint32_t val)
char
buf
[
buf_len
],
fullpath
[
200
];
/* convert val to string */
sprintf
(
buf
,
"%
d
"
,
val
);
sprintf
(
buf
,
"%
u
"
,
val
);
/* build the attribute path */
strcpy
(
fullpath
,
basepath
);
strcat
(
fullpath
,
attribute
[
attr
]);
...
...
@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
{
"help"
,
no_argument
,
0
,
'h'
},
{
0
,
0
,
0
,
0
}
};
int
i
,
opt_index
=
0
,
err
=
0
,
cur_val
;
int
i
,
opt_index
=
0
,
err
=
0
;
char
c
;
if
(
argc
==
1
)
{
...
...
@@ -175,7 +175,7 @@ int main(int argc, char *argv[])
printf
(
"Sysfs path to device is: %s
\n
"
,
basepath
);
for
(
i
=
0
;
i
<
FAU_TRIG_NUM_ATTR
;
++
i
)
{
cur_val
=
attrval
[
i
];
int
cur_val
=
attrval
[
i
];
if
(
cur_val
==
-
1
)
{
if
(
force
)
cur_val
=
attrdef
[
i
];
...
...
software/tools/parport-burst.c
View file @
e03fafa5
...
...
@@ -41,7 +41,8 @@ static void print_version(char *pname)
int
main
(
int
argc
,
char
**
argv
)
{
int
fd
,
addr
,
count
,
usec
,
ret
;
unsigned
int
addr
;
int
fd
,
count
,
usec
,
ret
;
int64_t
tics
;
if
((
argc
==
2
)
&&
...
...
@@ -84,8 +85,12 @@ int main(int argc, char **argv)
lseek
(
fd
,
addr
,
SEEK_SET
);
ret
=
write
(
fd
,
b
+
1
,
1
);
if
(
ret
<
0
)
break
;
lseek
(
fd
,
addr
,
SEEK_SET
);
ret
=
write
(
fd
,
b
+
0
,
1
);
if
(
ret
<
0
)
break
;
if
(
count
>
1
)
{
tics
+=
usec
;
...
...
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