IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#306 closed defect (fixed)

psRandom.h not included in pslib.h

Reported by: Paul Price Owned by: robert.desonia@…
Priority: high Milestone:
Component: types Version: 0.4.0
Severity: minor Keywords:
Cc:

Description

There is no #include line for psRandom.h in pslib.h (or its dependencies), which
leads to errors when compiling code that uses psRandom:

price@mithrandir:/home/mithrandir/price/testing>make
gcc -c -O0 -g -std=c99 -D_GNU_SOURCE
-I/home/mithrandir/price/psLib4/psLib/include/
-L/home/mithrandir/price/psLib4/psLib/lib/ testFFT.c
testFFT.c: In function `main':
testFFT.c:22: warning: initialization makes integer from pointer without a cast
testFFT.c:25: `psRandom' undeclared (first use in this function)
testFFT.c:25: (Each undeclared identifier is reported only once
testFFT.c:25: for each function it appears in.)
testFFT.c:25: `rng' undeclared (first use in this function)
testFFT.c:25: warning: implicit declaration of function `psRandomAlloc'
testFFT.c:25: `PS_RANDOM_TAUS' undeclared (first use in this function)
testFFT.c:26: warning: implicit declaration of function `psRandomUniform'
make: * [testFFT.o] Error 1

price@mithrandir:/home/mithrandir/price/psLib4/psLib/include>grep psRandom.h *.h
psRandom.h:/ @file psRandom.h

tst_psRandom.c includes psRandom.h explicitly, which does not suitably mimic the
true situation where the developer only includes pslib.h.

Workaround is to #include psRandom.h explicitly.

Change History (3)

comment:1 by robert.desonia@…, 21 years ago

Status: newassigned

comment:2 by robert.desonia@…, 21 years ago

Resolution: fixed
Status: assignedclosed

added psRandom.h to psLib.h, as suggested and removed any includes of
psRandom.h from the test code.

comment:3 by Paul Price, 21 years ago

Verified.

Note: See TracTickets for help on using tickets.