Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
10affed0
Commit
10affed0
authored
15 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
fix compiler warning
parent
25a49ccd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ares/ares_data.c
+20
-0
20 additions, 0 deletions
ares/ares_data.c
lib/base64.c
+15
-16
15 additions, 16 deletions
lib/base64.c
lib/memdebug.c
+20
-0
20 additions, 0 deletions
lib/memdebug.c
with
55 additions
and
16 deletions
ares/ares_data.c
+
20
−
0
View file @
10affed0
...
...
@@ -45,8 +45,18 @@ void ares_free_data(void *dataptr)
if
(
!
dataptr
)
return
;
#ifdef __INTEL_COMPILER
# pragma warning(push)
# pragma warning(disable:1684)
/* 1684: conversion from pointer to same-sized integral type */
#endif
ptr
=
(
void
*
)((
char
*
)
dataptr
-
offsetof
(
struct
ares_data
,
data
));
#ifdef __INTEL_COMPILER
# pragma warning(pop)
#endif
if
(
ptr
->
mark
!=
ARES_DATATYPE_MARK
)
return
;
...
...
@@ -134,8 +144,18 @@ ares_datatype ares_get_datatype(void * dataptr)
{
struct
ares_data
*
ptr
;
#ifdef __INTEL_COMPILER
# pragma warning(push)
# pragma warning(disable:1684)
/* 1684: conversion from pointer to same-sized integral type */
#endif
ptr
=
(
void
*
)((
char
*
)
dataptr
-
offsetof
(
struct
ares_data
,
data
));
#ifdef __INTEL_COMPILER
# pragma warning(pop)
#endif
if
(
ptr
->
mark
==
ARES_DATATYPE_MARK
)
return
ptr
->
type
;
...
...
This diff is collapsed.
Click to expand it.
lib/base64.c
+
15
−
16
View file @
10affed0
...
...
@@ -54,28 +54,27 @@ static const char table64[]=
static
void
decodeQuantum
(
unsigned
char
*
dest
,
const
char
*
src
)
{
size_t
x
=
0
;
int
i
;
char
*
found
;
union
{
ssize_t
sig
;
size_t
uns
;
}
offset
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
((
found
=
strchr
(
table64
,
src
[
i
]))
!=
NULL
)
{
offset
.
sig
=
found
-
table64
;
x
=
(
x
<<
6
)
+
offset
.
uns
;
const
char
*
s
,
*
p
;
unsigned
long
i
,
v
,
x
=
0
;
for
(
i
=
0
,
s
=
src
;
i
<
4
;
i
++
,
s
++
)
{
v
=
0
;
p
=
table64
;
while
(
*
p
&&
(
*
p
!=
*
s
))
{
v
++
;
p
++
;
}
else
if
(
src
[
i
]
==
'='
)
if
(
*
p
==
*
s
)
x
=
(
x
<<
6
)
+
v
;
else
if
(
*
s
==
'='
)
x
=
(
x
<<
6
);
}
dest
[
2
]
=
(
unsigned
char
)(
x
&
(
size_t
)
0xFFUL
);
dest
[
2
]
=
(
unsigned
char
)(
x
&
0xFFUL
);
x
>>=
8
;
dest
[
1
]
=
(
unsigned
char
)(
x
&
(
size_t
)
0xFFUL
);
dest
[
1
]
=
(
unsigned
char
)(
x
&
0xFFUL
);
x
>>=
8
;
dest
[
0
]
=
(
unsigned
char
)(
x
&
(
size_t
)
0xFFUL
);
dest
[
0
]
=
(
unsigned
char
)(
x
&
0xFFUL
);
}
/*
...
...
This diff is collapsed.
Click to expand it.
lib/memdebug.c
+
20
−
0
View file @
10affed0
...
...
@@ -221,9 +221,19 @@ void *curl_dorealloc(void *ptr, size_t wantedsize,
if
(
countcheck
(
"realloc"
,
line
,
source
))
return
NULL
;
#ifdef __INTEL_COMPILER
# pragma warning(push)
# pragma warning(disable:1684)
/* 1684: conversion from pointer to same-sized integral type */
#endif
if
(
ptr
)
mem
=
(
void
*
)((
char
*
)
ptr
-
offsetof
(
struct
memdebug
,
mem
));
#ifdef __INTEL_COMPILER
# pragma warning(pop)
#endif
mem
=
(
Curl_crealloc
)(
mem
,
size
);
if
(
source
)
curl_memlog
(
"MEM %s:%d realloc(%p, %zu) = %p
\n
"
,
...
...
@@ -243,8 +253,18 @@ void curl_dofree(void *ptr, int line, const char *source)
assert
(
ptr
!=
NULL
);
#ifdef __INTEL_COMPILER
# pragma warning(push)
# pragma warning(disable:1684)
/* 1684: conversion from pointer to same-sized integral type */
#endif
mem
=
(
void
*
)((
char
*
)
ptr
-
offsetof
(
struct
memdebug
,
mem
));
#ifdef __INTEL_COMPILER
# pragma warning(pop)
#endif
/* destroy */
memset
(
mem
->
mem
,
0x13
,
mem
->
size
);
...
...
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