Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cython warnings in sage.rings.polynomial.polynomial_modn_dense_ntl #33210

Closed
orlitzky opened this issue Jan 21, 2022 · 10 comments
Closed

Fix Cython warnings in sage.rings.polynomial.polynomial_modn_dense_ntl #33210

orlitzky opened this issue Jan 21, 2022 · 10 comments

Comments

@orlitzky
Copy link
Contributor

[sagelib-9.5.rc2] warning: sage/rings/polynomial/polynomial_modn_dense_ntl.pyx:876:32: local variable 'mod' referenced before assignment
[sagelib-9.5.rc2] warning: sage/rings/polynomial/polynomial_modn_dense_ntl.pyx:880:52: local variable 'mod' referenced before assignment
[sagelib-9.5.rc2] warning: sage/rings/polynomial/polynomial_modn_dense_ntl.pyx:1434:32: local variable 'mod' referenced before assignment
[sagelib-9.5.rc2] warning: sage/rings/polynomial/polynomial_modn_dense_ntl.pyx:1438:52: local variable 'mod' referenced before assignment

CC: @malb

Component: build

Author: Michael Orlitzky

Branch/Commit: b0fcca3

Reviewer: Martin Albrecht

Issue created by migration from https://trac.sagemath.org/ticket/33210

@orlitzky orlitzky added this to the sage-9.6 milestone Jan 21, 2022
@orlitzky
Copy link
Contributor Author

New commits:

b0fcca3Trac #33210: fix uninitialized pointer use in polynomial_modn_dense_ntl.pyx.

@orlitzky
Copy link
Contributor Author

Author: Michael Orlitzky

@orlitzky
Copy link
Contributor Author

Commit: b0fcca3

@orlitzky
Copy link
Contributor Author

Branch: u/mjo/ticket/33210

@orlitzky
Copy link
Contributor Author

comment:2

I've fixed the warning easy enough, but there's a glaring question to be answered here: if what I think is happening is actually happening (see the commit message), then why doesn't the existing code crash?

@orlitzky
Copy link
Contributor Author

comment:3

It looks like this code dates back to 2008 (commit 5ccad07).

@malb
Copy link
Member

malb commented Jan 22, 2022

comment:4

Good question, looks we just got lucky here? Your fix looks good to me,

@malb
Copy link
Member

malb commented Jan 22, 2022

Reviewer: Martin Albrecht

@orlitzky
Copy link
Contributor Author

comment:6

Ok, so long as I'm not overlooking some subtlety. Thanks!

@vbraun
Copy link
Member

vbraun commented Mar 1, 2022

Changed branch from u/mjo/ticket/33210 to b0fcca3

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

No branches or pull requests

3 participants