Declarations and public enumerations for the warning subsystem. More...
#include "options.h"
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. |
Declarations and public enumerations for the warning subsystem.
Definition in file warnings.h.
enum warning_action_e |
List of possible actions for warning messages.
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.
Definition at line 56 of file warnings.h.
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().
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().
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().
int wa__warn | ( | warning_e | index, | |
int | status, | |||
char * | format, | |||
... | ||||
) |
Possibly print a warning.