warnings.h File Reference

Declarations and public enumerations for the warning subsystem. More...

#include "options.h"
Include dependency graph for warnings.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  wa__warnings
 Definitions for warnings. More...

Enumerations

enum  warning_action_e {
  WA__WARN_ONCE = 0, WA__WARN_ALWAYS, WA__STOP, WA__IGNORE,
  WA__COUNT, _WA__LAST_INDEX
}
 

List of possible actions for warning messages.

More...
enum  warning_e {
  WRN__META_MTIME_INVALID, WRN__META_USER_INVALID, WRN__META_GROUP_INVALID, WRN__META_UMASK_INVALID,
  WRN__NO_URLLIST, WRN__CHARSET_INVALID, WRN__CHMOD_EPERM, WRN__CHMOD_OTHER,
  WRN__CHOWN_EPERM, WRN__CHOWN_OTHER, WRN__PROP_NAME_RESERVED, WRN__MIXED_REV_WC,
  WRN__DIFF_EXIT_STATUS, WRN__IGNPAT_WCBASE, WRN__TEST_WARNING, _WRN__LAST_INDEX
}
 

List of defined warnings.

More...

Functions

int wa__warn (warning_e index, int status, char *format,...) __attribute__((format(printf
 Possibly print a warning.
int int wa__set_warn_option (char *stg, enum opt__prio_e prio)
 Set the action of one or warnings.
int wa__summary (void)
 Print the warning summary as debug messages.
int wa__split_process (char *warn, int prio)
 Splits a string on whitespace, and sets warning options.

Detailed Description

Declarations and public enumerations for the warning subsystem.

Definition in file warnings.h.


Enumeration Type Documentation

List of possible actions for warning messages.

Enumerator:
WA__WARN_ONCE 

Warn only once.

This has to be 0 to be the default!

WA__WARN_ALWAYS 

Warn every time.

WA__STOP 

Print an error, stop execution, and exit with an error code.

WA__IGNORE 

Ignore this warning.

WA__COUNT 

Just count this warning.

If we got an WA__WARN_ONCE warning it's set to this value; this way it is still incremented and printed in a summary. Ignored warnings are completely ignored.

_WA__LAST_INDEX 

The maximum index.

Keep this at the end!

Definition at line 22 of file warnings.h.

enum warning_e

List of defined warnings.

Enumerator:
WRN__META_MTIME_INVALID 

Invalid mtime property.

WRN__META_USER_INVALID 

Invalid user property.

WRN__META_GROUP_INVALID 

Invalid group property.

WRN__META_UMASK_INVALID 

Invalid unix-mode property.

WRN__NO_URLLIST 

No URL defined for entry.

WRN__CHARSET_INVALID 

LC_CTYPE and/or LC_ALL are invalid.

WRN__CHMOD_EPERM 

A normal user gets a EPERM on chmod(), if he is not owner.

Could happen if file data is the same, but meta-data has changed.

WRN__CHMOD_OTHER 

Other error codes of chmod() - not needed, as they should always lead to a stop?

WRN__CHOWN_EPERM 

Normal users may not call chown(); they get an EPERM.

WRN__CHOWN_OTHER 

Other error codes of chown() - not needed, as they should always lead to a stop?

WRN__PROP_NAME_RESERVED 

A property should be set with an reserved name.

WRN__MIXED_REV_WC 

Mixed revision working copies not allowed.

WRN__DIFF_EXIT_STATUS 

Diff returned an exit status of 2 (means error).

But as that is returned for diffing binary files, too, the exit status is normally ignored.

WRN__IGNPAT_WCBASE 

Absolute ignore pattern doesn't match wc base.

WRN__TEST_WARNING 

Test warning - for debugging and automated testing.

_WRN__LAST_INDEX 

Maximum index - keep this at the end!

Definition at line 56 of file warnings.h.


Function Documentation

int int wa__set_warn_option ( char *  stg,
enum opt__prio_e  prio 
)

Set the action of one or warnings.

Set the action of one or warnings.

The given string is of the format warning=action.

action can be any of the wa__warn_action_text[] strings; warning is the startstring of any of the wa___warn_options. If more than one warnings matches this string, all are set to the given action. The command line option looks like this: -Wmeta-mtime=ignore.

Definition at line 102 of file warnings.c.

References _WA__LAST_INDEX, _WRN__LAST_INDEX, wa__warnings::action, action, DEBUGP, wa__warnings::prio, STOPIF_CODE_ERR, wa__warnings::text, and wa__warn_action_text.

Referenced by main(), and wa__split_process().

Here is the caller graph for this function:

int wa__split_process ( char *  warn,
int  prio 
)

Splits a string on whitespace, and sets warning options.

Definition at line 69 of file warnings.c.

References STOPIF, and wa__set_warn_option().

Referenced by opt___parse_warnings().

Here is the call graph for this function:

Here is the caller graph for this function:

int wa__summary ( void   ) 

Print the warning summary as debug messages.

Print the warning summary as debug messages.

Warnings set to WA__IGNORE are not printed.

Definition at line 218 of file warnings.c.

References _WRN__LAST_INDEX, action, wa__warnings::count, DEBUGP, STOPIF_CODE_EPIPE, STOPIF_CODE_ERR, wa__warnings::text, WA__IGNORE, and warn_out.

Referenced by main().

Here is the caller graph for this function:

int wa__warn ( warning_e  index,
int  status,
char *  format,
  ... 
)

Possibly print a warning.


Generated for fsvs by  doxygen 1.6.1