Skip to content

compile warning in unicodeobject.c #83827

Closed

Description

@shihai1991
BPO 39646
Nosy @vstinner, @shihai1991
PRs
  • bpo-39646: Remove compile warnings in unicodeobject.c #18519
  • Superseder
  • bpo-39500: Document PyUnicode_IsIdentifier() function
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-02-17.13:42:15.555>
    created_at = <Date 2020-02-16.07:51:44.059>
    labels = ['interpreter-core', 'build', '3.9']
    title = 'compile warning in unicodeobject.c'
    updated_at = <Date 2020-02-17.13:55:13.681>
    user = 'https://github.com/shihai1991'

    bugs.python.org fields:

    activity = <Date 2020-02-17.13:55:13.681>
    actor = 'shihai1991'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-02-17.13:42:15.555>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2020-02-16.07:51:44.059>
    creator = 'shihai1991'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39646
    keywords = ['patch']
    message_count = 5.0
    messages = ['362048', '362049', '362055', '362142', '362147']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'shihai1991']
    pr_nums = ['18519']
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '39500'
    type = 'compile error'
    url = 'https://bugs.python.org/issue39646'
    versions = ['Python 3.9']

    Activity

    1. shihai1991 commented on Feb 16, 2020

      @shihai1991
      MemberAuthor
      Objects/unicodeobject.c: In function ‘PyUnicode_IsIdentifier’:
      ./Include/cpython/unicodeobject.h:396:38: warning: ‘data’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                   ((const Py_UCS4 *)(data))[(index)] \
                                            ^
      Objects/unicodeobject.c:12211:11: note: ‘data’ was declared here
           void *data;
                 ^
      In file included from ./Include/unicodeobject.h:1026:0,
                       from ./Include/Python.h:97,
                       from Objects/unicodeobject.c:42:
      ./Include/cpython/unicodeobject.h:391:6: warning: ‘kind’ may be used uninitialized in this function [-Wmaybe-uninitialized]
           ((Py_UCS4) \
            ^
      Objects/unicodeobject.c:12210:9: note: ‘kind’ was declared here
           int kind;
               ^
    2. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      buildThe build process and cross-build
      on Feb 16, 2020
    3. shihai1991 commented on Feb 16, 2020

      @shihai1991
      MemberAuthor

      I will create PR later.

    4. shihai1991 commented on Feb 16, 2020

      @shihai1991
      MemberAuthor

      I don't find a good idea so I just add init operation :(

    5. vstinner commented on Feb 17, 2020

      @vstinner
      Member

      Yeah, I saw the warning, but it's a false alarm. Values are always initialized. Anyway. Thanks for fixing them ;-)

    6. shihai1991 commented on Feb 17, 2020

      @shihai1991
      MemberAuthor

      you are welcome ;0

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.9 (EOL)end of lifebuildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions