USDA-ARS-NWRC / smrf

SMRF was designed to increase the flexibility of taking measured weather data, or atmospheric models, and distributing the data across a watershed.
Other
12 stars 4 forks source link

C prototype warning #24

Closed scotthavens closed 7 years ago

scotthavens commented 7 years ago

In gitlab by @micahjohnson150 on Jul 25, 2017, 08:20

We are getting this new warning on building with python setup.py install. Here are the warnings we get. I think something was deprecated.

smrf/spatial/dk/lusolv.c:36:2: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  int *ivector();              /* int vector space allocation function */
  ^
smrf/spatial/dk/lusolv.c:37:2: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  int ludcmp();                /* lu decomposition function */
  ^
smrf/spatial/dk/lusolv.c:38:2: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  void lubksb();               /* lu backsubstitution function */
  ^
smrf/spatial/dk/lusolv.c: In function ‘ludcmp’:
smrf/spatial/dk/lusolv.c:71:6: warning: ‘imax’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int imax;                    /* index of largest array element */
      ^
gcc -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/micahjohnson/projects/micahenv/local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c smrf/spatial/dk/array.c -o build/temp.linux-x86_64-2.7/smrf/spatial/dk/array.o -fopenmp -O3
smrf/spatial/dk/array.c:20:9: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 double *vector(n)
         ^
smrf/spatial/dk/array.c:47:9: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 double *dvector(n)
         ^
smrf/spatial/dk/array.c:74:6: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int *ivector(n)
      ^
smrf/spatial/dk/array.c:101:10: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 double **matrix(nr, nc)
          ^
smrf/spatial/dk/array.c:146:10: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 double **dmatrix(nr, nc)
          ^
smrf/spatial/dk/array.c:191:7: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int **imatrix(nr, nc)
       ^
smrf/spatial/dk/array.c:231:11: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 double ***cube(nr, nc, nd)
scotthavens commented 7 years ago

In gitlab by @micahjohnson150 on Jul 25, 2017, 08:33

@micahsandusky this might be a good one for you when you get a chance.

scotthavens commented 7 years ago

In gitlab by @micahsandusky on Jul 27, 2017, 14:05

We are using old prototype styles here. I think this is an easy fix. I'll get to it tomorrow or Monday.

scotthavens commented 7 years ago

In gitlab by @micahsandusky on Aug 2, 2017, 15:48

I fixed most of them and checked the precip output to make sure it looks the same since they were coming from dk.

scotthavens commented 7 years ago

In gitlab by @micahsandusky on Aug 2, 2017, 15:55

mentioned in merge request !4