mirror of https://gitee.com/openkylin/libvirt.git
use G_GNUC_NULL_TERMINATED instead of ATTRIBUTE_SENTINEL
Prefer G_GNUC_NULL_TERMINATED which was introduced in GLib 2.8. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5d1c4a35ec
commit
426f396198
|
@ -1159,7 +1159,7 @@ qemuAgentCommand(qemuAgentPtr mon,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static virJSONValuePtr ATTRIBUTE_SENTINEL
|
||||
static virJSONValuePtr G_GNUC_NULL_TERMINATED
|
||||
qemuAgentMakeCommand(const char *cmdname,
|
||||
...)
|
||||
{
|
||||
|
|
|
@ -557,7 +557,7 @@ qemuMonitorJSONMakeCommandInternal(const char *cmdname,
|
|||
}
|
||||
|
||||
|
||||
static virJSONValuePtr ATTRIBUTE_SENTINEL
|
||||
static virJSONValuePtr G_GNUC_NULL_TERMINATED
|
||||
qemuMonitorJSONMakeCommand(const char *cmdname,
|
||||
...)
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ void virBufferAsprintf(virBufferPtr buf, const char *format, ...)
|
|||
void virBufferVasprintf(virBufferPtr buf, const char *format, va_list ap)
|
||||
ATTRIBUTE_FMT_PRINTF(2, 0);
|
||||
void virBufferStrcat(virBufferPtr buf, ...)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
G_GNUC_NULL_TERMINATED;
|
||||
void virBufferStrcatVArgs(virBufferPtr buf, va_list ap);
|
||||
|
||||
void virBufferEscape(virBufferPtr buf, char escape, const char *toescape,
|
||||
|
|
|
@ -42,7 +42,7 @@ virCommandPtr virCommandNew(const char *binary) ATTRIBUTE_NONNULL(1);
|
|||
virCommandPtr virCommandNewArgs(const char *const*args) ATTRIBUTE_NONNULL(1);
|
||||
|
||||
virCommandPtr virCommandNewArgList(const char *binary, ...)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
virCommandPtr virCommandNewVAList(const char *binary, va_list list)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
|
@ -137,7 +137,7 @@ void virCommandAddArgSet(virCommandPtr cmd,
|
|||
|
||||
void virCommandAddArgList(virCommandPtr cmd,
|
||||
... /* const char *arg, ..., NULL */)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
G_GNUC_NULL_TERMINATED;
|
||||
|
||||
void virCommandSetWorkingDirectory(virCommandPtr cmd,
|
||||
const char *pwd) ATTRIBUTE_NONNULL(2);
|
||||
|
|
|
@ -317,7 +317,7 @@ char *virFileFindMountPoint(const char *type);
|
|||
/* NB: this should be combined with virFileBuildPath */
|
||||
#define virBuildPath(path, ...) \
|
||||
virBuildPathInternal(path, __VA_ARGS__, NULL)
|
||||
int virBuildPathInternal(char **path, ...) ATTRIBUTE_SENTINEL;
|
||||
int virBuildPathInternal(char **path, ...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
int virFilePrintf(FILE *fp, const char *msg, ...)
|
||||
ATTRIBUTE_FMT_PRINTF(2, 3);
|
||||
|
|
|
@ -65,7 +65,7 @@ virFirewallRulePtr virFirewallAddRuleFull(virFirewallPtr firewall,
|
|||
virFirewallQueryCallback cb,
|
||||
void *opaque,
|
||||
...)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
G_GNUC_NULL_TERMINATED;
|
||||
|
||||
void virFirewallRemoveRule(virFirewallPtr firewall,
|
||||
virFirewallRulePtr rule);
|
||||
|
@ -88,7 +88,7 @@ void virFirewallRuleAddArgSet(virFirewallPtr firewall,
|
|||
void virFirewallRuleAddArgList(virFirewallPtr firewall,
|
||||
virFirewallRulePtr rule,
|
||||
...)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
G_GNUC_NULL_TERMINATED;
|
||||
|
||||
size_t virFirewallRuleGetArgCount(virFirewallRulePtr rule);
|
||||
|
||||
|
|
|
@ -48,11 +48,11 @@ void virJSONValueHashFree(void *opaque, const void *name);
|
|||
virJSONType virJSONValueGetType(const virJSONValue *value);
|
||||
|
||||
int virJSONValueObjectCreate(virJSONValuePtr *obj, ...)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
|
||||
int virJSONValueObjectCreateVArgs(virJSONValuePtr *obj, va_list args)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
int virJSONValueObjectAdd(virJSONValuePtr obj, ...)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
|
||||
int virJSONValueObjectAddVArgs(virJSONValuePtr obj, va_list args)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ struct _virTypedParameterRemote {
|
|||
|
||||
int virTypedParamsValidate(virTypedParameterPtr params, int nparams,
|
||||
/* const char *name, int type ... */ ...)
|
||||
ATTRIBUTE_SENTINEL ATTRIBUTE_RETURN_CHECK;
|
||||
G_GNUC_NULL_TERMINATED ATTRIBUTE_RETURN_CHECK;
|
||||
|
||||
bool virTypedParamsCheck(virTypedParameterPtr params,
|
||||
int nparams,
|
||||
|
|
|
@ -122,7 +122,7 @@ void vzDomObjFree(void *p);
|
|||
virDomainObjPtr vzDomObjFromDomain(virDomainPtr domain);
|
||||
|
||||
char * vzGetOutput(const char *binary, ...)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
|
||||
ATTRIBUTE_NONNULL(1) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
vzDriverPtr
|
||||
vzGetDriverConnection(void);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
#if WITH_QEMU || WITH_BHYVE
|
||||
static int ATTRIBUTE_SENTINEL
|
||||
static int G_GNUC_NULL_TERMINATED
|
||||
fillStringValues(virDomainCapsStringValuesPtr values, ...)
|
||||
{
|
||||
int ret = 0;
|
||||
|
|
|
@ -65,7 +65,7 @@ int qemuMonitorTestAddItemParams(qemuMonitorTestPtr test,
|
|||
const char *cmdname,
|
||||
const char *response,
|
||||
...)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
G_GNUC_NULL_TERMINATED;
|
||||
|
||||
int qemuMonitorTestAddItemExpect(qemuMonitorTestPtr test,
|
||||
const char *cmdname,
|
||||
|
|
|
@ -48,9 +48,9 @@ int virTestRun(const char *title,
|
|||
const void *data);
|
||||
int virTestLoadFile(const char *file, char **buf);
|
||||
char *virTestLoadFilePath(const char *p, ...)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
G_GNUC_NULL_TERMINATED;
|
||||
virJSONValuePtr virTestLoadFileJSON(const char *p, ...)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
G_GNUC_NULL_TERMINATED;
|
||||
|
||||
int virTestCaptureProgramOutput(const char *const argv[], char **buf, int maxlen);
|
||||
|
||||
|
|
Loading…
Reference in New Issue