Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PacketLib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andrea Bulgarelli
PacketLib
Commits
bb689179
Commit
bb689179
authored
10 years ago
by
Andrea Zoli
Browse files
Options
Downloads
Patches
Plain Diff
Fix 32bit compilation warnings.
parent
ef5daf3f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/File.cpp
+1
-1
1 addition, 1 deletion
src/File.cpp
src/PartOfPacket.cpp
+8
-2
8 additions, 2 deletions
src/PartOfPacket.cpp
with
9 additions
and
3 deletions
src/File.cpp
+
1
−
1
View file @
bb689179
...
@@ -222,7 +222,7 @@ long File::getpos()
...
@@ -222,7 +222,7 @@ long File::getpos()
bool
File
::
memBookmarkPos
()
bool
File
::
memBookmarkPos
()
{
{
if
((
bookmarkPos
=
ftell
(
fp
))
!=
(
dword
)
-
1
)
if
((
bookmarkPos
=
ftell
(
fp
))
!=
-
1
)
return
true
;
return
true
;
else
else
return
false
;
return
false
;
...
...
This diff is collapsed.
Click to expand it.
src/PartOfPacket.cpp
+
8
−
2
View file @
bb689179
...
@@ -514,7 +514,11 @@ double PartOfPacket::getFieldValue_64f(word index)
...
@@ -514,7 +514,11 @@ double PartOfPacket::getFieldValue_64f(word index)
/// 64 bit double precision
/// 64 bit double precision
double
d
;
double
d
;
}
u
;
}
u
;
#ifdef __x86_64__
u
.
i
=
(
unsigned
long
)
(
(
unsigned
long
)
getFieldValue
(
index
)
<<
(
48
))
|
(
(
unsigned
long
)
getFieldValue
(
index
+
1
)
<<
(
32
))
|
(
(
unsigned
long
)
getFieldValue
(
index
+
2
)
<<
(
16
))
|
(
(
unsigned
long
)
getFieldValue
(
index
+
3
)
);
u
.
i
=
(
unsigned
long
)
(
(
unsigned
long
)
getFieldValue
(
index
)
<<
(
48
))
|
(
(
unsigned
long
)
getFieldValue
(
index
+
1
)
<<
(
32
))
|
(
(
unsigned
long
)
getFieldValue
(
index
+
2
)
<<
(
16
))
|
(
(
unsigned
long
)
getFieldValue
(
index
+
3
)
);
#endif
return
u
.
d
;
return
u
.
d
;
}
}
...
@@ -542,6 +546,7 @@ void PartOfPacket::setFieldValue_64f(word index, double value)
...
@@ -542,6 +546,7 @@ void PartOfPacket::setFieldValue_64f(word index, double value)
throw
new
PacketException
(
"The getFieldValue_64f() does not work in a 32 bit operating system"
);
throw
new
PacketException
(
"The getFieldValue_64f() does not work in a 32 bit operating system"
);
}
}
#if __x86_64__
union
u_tag
union
u_tag
{
{
/// 64 bit for 64 bit os)
/// 64 bit for 64 bit os)
...
@@ -560,6 +565,7 @@ void PartOfPacket::setFieldValue_64f(word index, double value)
...
@@ -560,6 +565,7 @@ void PartOfPacket::setFieldValue_64f(word index, double value)
setFieldValue
(
index
+
2
,
w
);
setFieldValue
(
index
+
2
,
w
);
w
=
(
word
)(
0xFFFF
&
u
.
i
);
w
=
(
word
)(
0xFFFF
&
u
.
i
);
setFieldValue
(
index
+
3
,
w
);
setFieldValue
(
index
+
3
,
w
);
#endif
}
}
signed
long
PartOfPacket
::
getFieldValue_32i
(
word
index
)
signed
long
PartOfPacket
::
getFieldValue_32i
(
word
index
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment