Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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
Software for White Rabbit PTP Core
Commits
c0288cc0
Commit
c0288cc0
authored
Nov 17, 2014
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
softpll: fix int/uint 32/64 compilation warnings
parent
fc63d9cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
softpll_ng.c
softpll/softpll_ng.c
+7
-6
No files found.
softpll/softpll_ng.c
View file @
c0288cc0
...
...
@@ -672,6 +672,7 @@ static int calc_apr(int meas_min, int meas_max, int f_center )
int64_t
delta_low
=
meas_min
-
f_center
;
int64_t
delta_hi
=
meas_max
-
f_center
;
uint64_t
u_delta_low
,
u_delta_hi
;
int
ppm_lo
,
ppm_hi
;
if
(
delta_low
>=
0
)
...
...
@@ -680,13 +681,13 @@ static int calc_apr(int meas_min, int meas_max, int f_center )
return
-
1
;
/* __div64_32 divides 64 by 32; result is in the 64 argument. */
delta_low
=
-
(
int64_t
)
delta_low
*
1000000LL
;
__div64_32
(
&
delta_low
,
f_center
);
ppm_lo
=
delta_low
;
u_delta_low
=
-
delta_low
*
1000000LL
;
__div64_32
(
&
u_
delta_low
,
f_center
);
ppm_lo
=
(
int
)
u_
delta_low
;
delta_hi
=
delta_hi
*
1000000LL
;
__div64_32
(
&
delta_hi
,
f_center
);
ppm_hi
=
delta_hi
;
u_
delta_hi
=
delta_hi
*
1000000LL
;
__div64_32
(
&
u_
delta_hi
,
f_center
);
ppm_hi
=
(
int
)
u_
delta_hi
;
return
ppm_lo
<
ppm_hi
?
ppm_lo
:
ppm_hi
;
}
...
...
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