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
bfe4fd5f
Commit
bfe4fd5f
authored
Feb 09, 2018
by
Serhiy Storchaka
Committed by
GitHub
Feb 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some warnings produced by different compilers. (#5593)
parent
5bb0005f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
7 deletions
+19
-7
Modules/_decimal/libmpdec/mpdecimal.c
Modules/_decimal/libmpdec/mpdecimal.c
+6
-0
Modules/socketmodule.c
Modules/socketmodule.c
+6
-2
Modules/timemodule.c
Modules/timemodule.c
+2
-0
Python/context.c
Python/context.c
+2
-2
Python/hamt.c
Python/hamt.c
+2
-2
Python/pyhash.c
Python/pyhash.c
+1
-1
No files found.
Modules/_decimal/libmpdec/mpdecimal.c
View file @
bfe4fd5f
...
...
@@ -53,6 +53,12 @@
#endif
/* Disable warning that is part of -Wextra since gcc 7.0. */
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#if defined(_MSC_VER)
#define ALWAYS_INLINE __forceinline
#elif defined(LEGACY_COMPILER)
...
...
Modules/socketmodule.c
View file @
bfe4fd5f
...
...
@@ -4867,7 +4867,9 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwds)
if
(
type
==
-
1
)
{
int
tmp
;
socklen_t
slen
=
sizeof
(
tmp
);
if
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_TYPE
,
&
tmp
,
&
slen
)
==
0
)
{
if
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_TYPE
,
(
void
*
)
&
tmp
,
&
slen
)
==
0
)
{
type
=
tmp
;
}
else
{
#ifdef MS_WINDOWS
...
...
@@ -4885,7 +4887,9 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwds)
if
(
proto
==
-
1
)
{
int
tmp
;
socklen_t
slen
=
sizeof
(
tmp
);
if
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_PROTOCOL
,
&
tmp
,
&
slen
)
==
0
)
{
if
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_PROTOCOL
,
(
void
*
)
&
tmp
,
&
slen
)
==
0
)
{
proto
=
tmp
;
}
else
{
#ifdef MS_WINDOWS
...
...
Modules/timemodule.c
View file @
bfe4fd5f
...
...
@@ -1192,11 +1192,13 @@ _PyTime_GetProcessTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
if
(
freq
!=
-
1
)
{
/* check that _PyTime_MulDiv(t, SEC_TO_NS, ticks_per_second)
cannot overflow below */
#if LONG_MAX > _PyTime_MAX / SEC_TO_NS
if
((
_PyTime_t
)
freq
>
_PyTime_MAX
/
SEC_TO_NS
)
{
PyErr_SetString
(
PyExc_OverflowError
,
"_SC_CLK_TCK is too large"
);
return
-
1
;
}
#endif
ticks_per_second
=
freq
;
}
...
...
Python/context.c
View file @
bfe4fd5f
...
...
@@ -8,7 +8,7 @@
#define CONTEXT_FREELIST_MAXLEN 255
static
PyContext
*
ctx_freelist
=
NULL
;
static
Py_ssize_
t
ctx_freelist_len
=
0
;
static
in
t
ctx_freelist_len
=
0
;
#include "clinic/context.c.h"
...
...
@@ -1177,7 +1177,7 @@ get_token_missing(void)
int
PyContext_ClearFreeList
(
void
)
{
Py_ssize_
t
size
=
ctx_freelist_len
;
in
t
size
=
ctx_freelist_len
;
while
(
ctx_freelist_len
)
{
PyContext
*
ctx
=
ctx_freelist
;
ctx_freelist
=
(
PyContext
*
)
ctx
->
ctx_weakreflist
;
...
...
Python/hamt.c
View file @
bfe4fd5f
...
...
@@ -729,7 +729,7 @@ hamt_node_bitmap_assoc(PyHamtNode_Bitmap *self,
uint32_t
key_idx
=
2
*
idx
;
uint32_t
val_idx
=
key_idx
+
1
;
assert
(
val_idx
<
Py_SIZE
(
self
));
assert
(
val_idx
<
(
size_t
)
Py_SIZE
(
self
));
PyObject
*
key_or_null
=
self
->
b_array
[
key_idx
];
PyObject
*
val_or_node
=
self
->
b_array
[
val_idx
];
...
...
@@ -1123,7 +1123,7 @@ hamt_node_bitmap_find(PyHamtNode_Bitmap *self,
key_idx
=
idx
*
2
;
val_idx
=
key_idx
+
1
;
assert
(
val_idx
<
Py_SIZE
(
self
));
assert
(
val_idx
<
(
size_t
)
Py_SIZE
(
self
));
key_or_null
=
self
->
b_array
[
key_idx
];
val_or_node
=
self
->
b_array
[
val_idx
];
...
...
Python/pyhash.c
View file @
bfe4fd5f
...
...
@@ -17,7 +17,7 @@
extern
"C"
{
#endif
_Py_HashSecret_t
_Py_HashSecret
=
{
0
};
_Py_HashSecret_t
_Py_HashSecret
=
{
{
0
}
};
#if Py_HASH_ALGORITHM == Py_HASH_EXTERNAL
extern
PyHash_FuncDef
PyHash_Func
;
...
...
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