On 2009-02-10 21:03-0000 trc wrote:

> Compiling qsastime etc with MSVC 9 and cygwin gcc 3.4 showed some errors-
>
> 1. plplot-dev/lib/qsastime/qsastime.c:282: warning: assignment
>   makes integer from pointer without a cast
>   plplot-dev/lib/qsastime/qsastime.c:285: warning: assignment
>   makes integer from pointer without a cast
>
>   In both these cases, year should be dereferenced ie *year.
>
>
> 2. ..\..\..\..\lib\qsastime\qsastime_testlib.c(58) : warning C4244:
>   'return' : conversion from 'time_t' to 'int', possible loss of data
>
>   I think  my_timegm is meant to be defined in line 44 as
>      time_t my_timegm(struct tm *tm)
>
> 3. plplot-dev\lib\qsastime\qsastime_testlib.c(128) : warning C4700:
>    uninitialized local variable 'secs1' used
>   plplot-dev\lib\qsastime\qsastime_testlib.c(144) : warning C4700:
>    uninitialized local variable 'secs1' used
>
>   In both these cases secs1 should be sec1
>
> A patch for items 1-3 above is attached.

I had caught one of those already (incorrectly using year rather than
*year), but I committed the rest of your patch as revision 9501.  I gave
credit in the commit message to Terrence Keats.  I hope that is your correct
last name.

It turns out (on my system at least) all bugs other than the *year problem
(which was fixed in a previous commit) have no effect on test1 results, but
these bugs would have caught up with me eventually for other tests so
thanks!

> [out of order] 4. qsastime_testlib cannot be built with MSVC 2008 as setenv 
> and unsetenv
>    are not implemented.
>
> [so] the above changes
> are untested.

Is this a showstopper for MSVC 2008 or do you think you can find for that
platform (a) some library alternatives for setenv and unsetenv, (b) some
other alternative to set the time zone to zero temporarily which would make
mktime act like an inverse to gmtime, or (c) some other alternative that is
equivalent to the Linux timegm or the inverse of gmtime?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to