Skip to content

Spurious warnings in gfortran #577

Open
@iajzenszmi

Description

@iajzenszmi

Description

Various compilation warnings. eg "n may be used unitialized in this function".
The code should be edited so that zero warnings are produced. with the -Wall flag on.

Warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/ian/fortran-stdlib/src/stdlib_stats_var.f90:4258:0:

 4258 |         real(sp) :: n
      | 
Warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/ian/fortran-stdlib/src/stdlib_stats_var.f90:4099:0:

 4099 |         real(qp) :: n
      | 
Warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/ian/fortran-stdlib/src/stdlib_stats_var.f90:3940:0:

 3940 |         real(xdp) :: n
      | 
Warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/ian/fortran-stdlib/src/stdlib_stats_var.f90:3781:0:

 3781 |         real(dp) :: n
      | 
Warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/ian/fortran-stdlib/src/stdlib_stats_var.f90:3622:0:

 3622 |         real(sp) :: n
      | 
Warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/ian/fortran-stdlib/src/stdlib_stats_var.f90:2815:0:

 2815 |         real(dp) :: n
      | 
Warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/home/ian/fortran-stdlib/src/stdlib_stats_var.f90:2772:0:

Expected Behaviour

A make run in which Warning messages are absent when running -Wall.

Version of stdlib

Fork 88

Platform and Architecture

Linux ubuntu

Additional Information

https://dl.acm.org/doi/abs/10.1145/763984.763986

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions