#### Description:

This function returns an AST KeyMap object holding the text of any warnings issued as a result of the previous invocation of the astRead or astWrite function on the Channel. If no warnings were issued, a a NULL value will be returned.

Such warnings are non-fatal and will not prevent the read or write operation succeeding. However, the converted object may not be identical to the original object in all respects. Differences which would usually be deemed as insignificant in most usual cases will generate a warning, whereas more significant differences will generate an error.

The `"` Strict `"` attribute allows this warning facility to be switched off, so that a fatal error is always reported for any conversion error.

#### Synopsis

AstKeyMap ∗astWarnings( AstChannel ∗this )

#### Parameters:

##### this

Pointer to the Channel.

#### Applicability

##### Channel

The basic Channel class generates a warning when ever an un-recognised item is encountered whilst reading an Object from an external data source. If Strict is zero (the default), then unexpected items in the Object description are simply ignored, and any remaining items are used to construct the returned Object. If Strict is non-zero, an error will be reported and a NULL Object pointer returned if any unexpected items are encountered.

As AST continues to be developed, new attributes are added occasionally to selected classes. If an older version of AST is used to read external Object descriptions created by a more recent version of AST, then the Channel class will, by default, ignore the new attributes, using the remaining attributes to construct the Object. This is usually a good thing. However, since external Object descriptions are often stored in plain text, it is possible to edit them using a text editor. This gives rise to the possibility of genuine errors in the description due to finger-slips, typos, or simple mis-understanding. Such inappropriate attributes will be ignored if Strict is left at its default zero value. This will cause the mis-spelled attribute to revert to its default value, potentially causing subtle changes in the behaviour of application software. If such an effect is suspected, the Strict attribute can be set non-zero, resulting in the erroneous attribute being identified in an error message.

##### FitsChan

The returned KeyMap will contain warnings for all conditions listed in the Warnings attribute.

##### XmlChan

Reports conversion errors that result in what are usally insignificant changes.

#### Returned Value

##### astWarnings()

A pointer to the KeyMap holding the warning messages, or NULL if no warnings were issued during the previous read operation.

#### Notes:

- The returned KeyMap uses keys of the form `"` Warning_1`"` , `"` Warning_2`"` , etc.

- A value of NULL will be returned if this function is invoked with the AST error status set, or if it should fail for any reason.

Copyright (C) 2021 East Asian Observatory