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

MAINT: special: Fix a warning generated when building the AMOS library. #10041

Merged
merged 1 commit into from
Apr 10, 2019

Conversation

WarrenWeckesser
Copy link
Member

Unlike the other ZBES* functions, in ZBESY the variable R1M5 is not
declared, so its type defaults to REAL*4 (i.e. single precision float).
This means we get a warning when zbesy.f is compiled, because D1MACH
returns a double precision value:

scipy/special/amos/zbesy.f:183:13:

       R1M5 = D1MACH(5)
             1
Warning: Possible change of value in conversion from REAL(8) to REAL(4) at (1) [-Wconversion]

Presumably this is a mistake. The fix is to add the declaration of
the variable R1M5 as double precision.

(I can hear the Fortran coders out there tsk-tsking and saying
"IMPLICT NONE would have caught that!".)

Unlike the other ZBES* functions, in ZBESY the variable R1M5 is not
declared, so its type defaults to REAL*4 (i.e. single precision float).
This means we get a warning when zbesy.f is compiled, because D1MACH
returns a double precision value:

    scipy/special/amos/zbesy.f:183:13:

           R1M5 = D1MACH(5)
                 1
    Warning: Possible change of value in conversion from REAL(8) to REAL(4) at (1) [-Wconversion]

Presumably this is a mistake.  The fix is to add the declaration of
the variable R1M5 as double precision.

(I can hear the Fortran coders out there tsk-tsking and saying
"`IMPLICT NONE` would have caught that!".)
@WarrenWeckesser WarrenWeckesser added scipy.special maintenance Items related to regular maintenance tasks labels Apr 10, 2019
@WarrenWeckesser
Copy link
Member Author

The failures on TravisCI are #9308.

@rgommers rgommers added this to the 1.3.0 milestone Apr 10, 2019
@rgommers rgommers merged commit e531116 into scipy:master Apr 10, 2019
@rgommers
Copy link
Member

merged, thanks Warren

@WarrenWeckesser WarrenWeckesser deleted the zbesy-warning branch April 10, 2019 07:57
@WarrenWeckesser WarrenWeckesser added the Fortran Items related to the internal Fortran code base label Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fortran Items related to the internal Fortran code base maintenance Items related to regular maintenance tasks scipy.special
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants