Skip to content

New warnings: warning: unused function 'ensure_shared_on_read' [-Wunused-function] #116029

Description

@Eclips4

Bug report

Bug description:

Popped up during the build (./configure --with-pydebug && make -j):

Objects/dictobject.c:1233:1: warning: unused function 'ensure_shared_on_read' [-Wunused-function]
ensure_shared_on_read(PyDictObject *mp)
^
In file included from Objects/obmalloc.c:16:
In file included from Objects/mimalloc/static.c:23:
Objects/mimalloc/alloc.c:77:5: warning: static function 'mi_debug_fill' is used in an inline function with external linkage [-Wstatic-in-inline]
mi_debug_fill(page, block, MI_DEBUG_UNINIT, mi_page_usable_block_size(page));
^
Objects/mimalloc/alloc.c:30:13: note: 'mi_debug_fill' declared here
static void mi_debug_fill(mi_page_t* page, mi_block_t* block, int c, size_t size) {
...
Objects/dictobject.c:5032:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
    if (!dictiter_iternext_threadsafe(d, self, &value, NULL) == 0) {
        ^                                                    ~~
Objects/dictobject.c:5032:9: note: add parentheses after the '!' to evaluate the comparison first
    if (!dictiter_iternext_threadsafe(d, self, &value, NULL) == 0) {
        ^
         (                                                       )
Objects/dictobject.c:5032:9: note: add parentheses around left hand side expression to silence this warning
    if (!dictiter_iternext_threadsafe(d, self, &value, NULL) == 0) {
        ^
        (                                                   )
Objects/dictobject.c:5155:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
    if (!dictiter_iternext_threadsafe(d, self, NULL, &value) == 0) {
        ^                                                    ~~
Objects/dictobject.c:5155:9: note: add parentheses after the '!' to evaluate the comparison first
    if (!dictiter_iternext_threadsafe(d, self, NULL, &value) == 0) {
        ^
         (                                                       )
Objects/dictobject.c:5155:9: note: add parentheses around left hand side expression to silence this warning
    if (!dictiter_iternext_threadsafe(d, self, NULL, &value) == 0) {
        ^

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions