[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #JYQ-941555]: XML override warnings from UDUNITS



Pavel,

> I am the developer of the R contribution package RNetCDF
> (http://cran.r-project.org/).

I'm pleased to make your acquaintance.

> I've updated the package for usage with UDUNITS-2. Some users report the
> following warnings when testing the (pre-release) package:
> 
> * checking foreign function calls ... WARNING
> Definition of "kt" in "/usr/share/xml/udunits/udunits2-common.xml", line
> 90, overrides prefixed-unit "1000000 kilogram"
> Definition of "microns" in "/usr/share/xml/udunits/udunits2-common.xml",
> line 308, overrides prefixed-unit "1e-15 second"
> Definition of "ft" in "/usr/share/xml/udunits/udunits2-common.xml", line
> 405, overrides prefixed-unit "1e-12 kilogram"
> Definition of "yd" in "/usr/share/xml/udunits/udunits2-common.xml", line
> 413, overrides prefixed-unit "8.64e-20 second"
> Definition of "pt" in "/usr/share/xml/udunits/udunits2-common.xml", line
> 634, overrides prefixed-unit "1e-09 kilogram"
> Definition of "at" in "/usr/share/xml/udunits/udunits2-common.xml", line
> 1031, overrides prefixed-unit "1e-15 kilogram"
> Definition of "ph" in "/usr/share/xml/udunits/udunits2-common.xml", line
> 1549, overrides prefixed-unit "3.6e-09 second"
> Definition of "nt" in "/usr/share/xml/udunits/udunits2-common.xml", line
> 1556, overrides prefixed-unit "1e-06 kilogram"
> 
> I've added the following routine to all functions which call a UDUNITS
> function (as found in your archives):
> 
> #ifdef UT_UNITS2_H_INCLUDED
> ut_system* unitSystem;
> ut_set_error_message_handler(ut_ignore);
> unitSystem = ut_read_xml(NULL);
> ut_set_error_message_handler(ut_write_to_stderr);
> #endif

This is exactly what the udunits2(1) utility does.

> My questions are:
> 
> 1) Do you have any hints, why this seems to be mostly related to Debian
> systems (on SuSE and on Mac OS X, no warnings were reported)?

The UDUNITS-2 library should emit these warning messages on all operating 
systems. If that's not the case, then I have no idea why.

> 2) Is there an easier way to suppress these warnings?

Sorry, no.

> Thanks.
> 
> Best Regards,
> Pavel Michna
> 
> --
> ------------------------------------------------------------------------
> 
> Pavel Michna (PhD Student)                  Tel:     +41 (0)31 631 85 42
> Climatology and Meteorology (KLIMET)        Fax:     +41 (0)31 631 85 11
> Institute of Geography                      E-Mail: address@hidden
> University of Bern
> Hallerstrasse 12
> CH-3012 Bern/Switzerland


Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: JYQ-941555
Department: Support UDUNITS
Priority: Normal
Status: Closed