Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
13df793e
Commit
13df793e
authored
Oct 31, 2012
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #9566: Explicit downcast to fix compiler warnings on Win64
parent
5eba8f27
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
Modules/faulthandler.c
Modules/faulthandler.c
+4
-2
Modules/md5module.c
Modules/md5module.c
+1
-1
Modules/sha1module.c
Modules/sha1module.c
+1
-1
Modules/zlibmodule.c
Modules/zlibmodule.c
+2
-2
No files found.
Modules/faulthandler.c
View file @
13df793e
...
@@ -22,7 +22,9 @@
...
@@ -22,7 +22,9 @@
# define FAULTHANDLER_USER
# define FAULTHANDLER_USER
#endif
#endif
#define PUTS(fd, str) write(fd, str, strlen(str))
/* cast size_t to int because write() takes an int on Windows
(anyway, the length is smaller than 30 characters) */
#define PUTS(fd, str) write(fd, str, (int)strlen(str))
#ifdef HAVE_SIGACTION
#ifdef HAVE_SIGACTION
typedef
struct
sigaction
_Py_sighandler_t
;
typedef
struct
sigaction
_Py_sighandler_t
;
...
@@ -445,7 +447,7 @@ faulthandler_thread(void *unused)
...
@@ -445,7 +447,7 @@ faulthandler_thread(void *unused)
/* get the thread holding the GIL, NULL if no thread hold the GIL */
/* get the thread holding the GIL, NULL if no thread hold the GIL */
current
=
_Py_atomic_load_relaxed
(
&
_PyThreadState_Current
);
current
=
_Py_atomic_load_relaxed
(
&
_PyThreadState_Current
);
write
(
thread
.
fd
,
thread
.
header
,
thread
.
header_len
);
write
(
thread
.
fd
,
thread
.
header
,
(
int
)
thread
.
header_len
);
errmsg
=
_Py_DumpTracebackThreads
(
thread
.
fd
,
thread
.
interp
,
current
);
errmsg
=
_Py_DumpTracebackThreads
(
thread
.
fd
,
thread
.
interp
,
current
);
ok
=
(
errmsg
==
NULL
);
ok
=
(
errmsg
==
NULL
);
...
...
Modules/md5module.c
View file @
13df793e
...
@@ -246,7 +246,7 @@ md5_process(struct md5_state *md5, const unsigned char *in, Py_ssize_t inlen)
...
@@ -246,7 +246,7 @@ md5_process(struct md5_state *md5, const unsigned char *in, Py_ssize_t inlen)
}
else
{
}
else
{
n
=
MIN
(
inlen
,
(
Py_ssize_t
)(
MD5_BLOCKSIZE
-
md5
->
curlen
));
n
=
MIN
(
inlen
,
(
Py_ssize_t
)(
MD5_BLOCKSIZE
-
md5
->
curlen
));
memcpy
(
md5
->
buf
+
md5
->
curlen
,
in
,
(
size_t
)
n
);
memcpy
(
md5
->
buf
+
md5
->
curlen
,
in
,
(
size_t
)
n
);
md5
->
curlen
+=
n
;
md5
->
curlen
+=
(
MD5_INT32
)
n
;
in
+=
n
;
in
+=
n
;
inlen
-=
n
;
inlen
-=
n
;
if
(
md5
->
curlen
==
MD5_BLOCKSIZE
)
{
if
(
md5
->
curlen
==
MD5_BLOCKSIZE
)
{
...
...
Modules/sha1module.c
View file @
13df793e
...
@@ -222,7 +222,7 @@ sha1_process(struct sha1_state *sha1,
...
@@ -222,7 +222,7 @@ sha1_process(struct sha1_state *sha1,
}
else
{
}
else
{
n
=
MIN
(
inlen
,
(
Py_ssize_t
)(
SHA1_BLOCKSIZE
-
sha1
->
curlen
));
n
=
MIN
(
inlen
,
(
Py_ssize_t
)(
SHA1_BLOCKSIZE
-
sha1
->
curlen
));
memcpy
(
sha1
->
buf
+
sha1
->
curlen
,
in
,
(
size_t
)
n
);
memcpy
(
sha1
->
buf
+
sha1
->
curlen
,
in
,
(
size_t
)
n
);
sha1
->
curlen
+=
n
;
sha1
->
curlen
+=
(
SHA1_INT32
)
n
;
in
+=
n
;
in
+=
n
;
inlen
-=
n
;
inlen
-=
n
;
if
(
sha1
->
curlen
==
SHA1_BLOCKSIZE
)
{
if
(
sha1
->
curlen
==
SHA1_BLOCKSIZE
)
{
...
...
Modules/zlibmodule.c
View file @
13df793e
...
@@ -161,7 +161,7 @@ PyZlib_compress(PyObject *self, PyObject *args)
...
@@ -161,7 +161,7 @@ PyZlib_compress(PyObject *self, PyObject *args)
goto
error
;
goto
error
;
}
}
input
=
pinput
.
buf
;
input
=
pinput
.
buf
;
length
=
pinput
.
len
;
length
=
(
unsigned
int
)
pinput
.
len
;
zst
.
avail_out
=
length
+
length
/
1000
+
12
+
1
;
zst
.
avail_out
=
length
+
length
/
1000
+
12
+
1
;
...
@@ -251,7 +251,7 @@ PyZlib_decompress(PyObject *self, PyObject *args)
...
@@ -251,7 +251,7 @@ PyZlib_decompress(PyObject *self, PyObject *args)
goto
error
;
goto
error
;
}
}
input
=
pinput
.
buf
;
input
=
pinput
.
buf
;
length
=
pinput
.
len
;
length
=
(
unsigned
int
)
pinput
.
len
;
if
(
r_strlen
<=
0
)
if
(
r_strlen
<=
0
)
r_strlen
=
1
;
r_strlen
=
1
;
...
...
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