---
name: "VistaIOWarning"
section: "3"
platform: "linux"
package: "libvistaio-dev"
version: "1.2.19-3+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/VistaIOWarning"
---

# VistaIOWarning(3)

report a nonfatal error

## NAME

VistaIOWarning, VistaIOSystemWarning - report a nonfatal error

## SYNOPSIS

```
void VistaIOWarning (format [, arg...])
VistaIOStringConst format;
```

**void VistaIOSystemWarning (***format* \[**,** *arg*...\]**)**

**VistaIOStringConst** *format***;**

## ARGUMENTS

- *format*

  **Specifies the format of the message that is to be reported.**

- *arg*

  **Specifies values that are to be included in the formatted message.**

## DESCRIPTION

**VistaIOWarning is called to report a nonfatal error. It composes an error**  **message and passes it to the nonfatal error handler, which typically prints**  **the message and returns (see [VistaIOSetWarningHandler(3)](/VistaIOSetWarningHandler/3.md)).**

**The message composed by VistaIOWarning is of the form:**

```
Program: Warning: Description.
```

*Program***, the program's name, is included if it has been previously**  **established with a call to VistaIOSetProgramName.** *Description* **is a**  **string that has been formatted by sprintf using** *format***, plus**  **all of the optional arguments,** *arg***.**

**VistaIOSystemWarning is identical to VistaIOWarning except that it also**  **includes in the message a phrase based on the current value of the external**  **variable errno, which is used by system calls to return diagnostic**  **codes. The message composed by VistaIOSystemWarning is of the form:**

```
Program: Warning: Description: Diagnostic.
```

*Diagnostic* **is a short phrase corresponding to the value of**  **errno. This phrase is drawn from the table used by [perror(3)](/perror/3.md).**

## EXAMPLES

**In this first example, the values of attr\_name, act\_value,** **and exp\_value are incorporated into the error message produced by** **VistaIOWarning.**

```
char *attr_name;
float act_value, exp_value;
if (act_value != exp_value)
	VistaIOWarning ("MyRoutine: Attribute %s is %f rather than %f",
		attr_name, act_value, exp_value);
```

**In this second example, the diagnostic phrase corresponding to the value of**  **errno is incorporated into the error message produced by** **VistaIOSystemWarning.**

```
if (ioctl (fd, request, arg) == -1)
	VistaIOSystemWarning ("MyRoutine: ioctl failed");
```

## SEE ALSO

[**VistaIOError**(3)](/VistaIOError/3.md), [**VistaIOSetWarningHandler**(3)](/VistaIOSetWarningHandler/3.md), [**VistaIOSetProgramName**(3)](/VistaIOSetProgramName/3.md), [**perror**(3)](/perror/3.md),

## AUTHOR

**Art Pope \<pope@cs.ubc.ca\>**

**Adaption to vistaio: Gert Wollny \<gw.fossdev@gmail.com\>**
