Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tkinter: return value ofmp_init() should not be ignored #106350

Closed
Labels
stdlibStandard Library Python modules in the Lib/ directorytopic-tkintertype-bugAn unexpected behavior, bug, or error
@chrstphrchvz

Description

@chrstphrchvz

Anmp_int structure is usable only ifmp_init() returnsMP_OKAY;mp_init() may returnMP_MEM if it fails to allocate memory (seehttps://github.com/libtom/libtommath/blob/v1.2.0/bn_mp_init.c#L12).

mp_init() must be checked to avoid a warning when compiling against standalone libtommath headers (rather than Tcl-bundled libtommath):

./Modules/_tkinter.c:908:5: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]    mp_init(&bigValue);    ^~~~~~~ ~~~~~~~~~1 warning generated.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-tkintertype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp