mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
virAsprintf: remove its warn_unused_result attribute
* src/util/util.h (virAsprintf): Remove ATTRIBUTE_RETURN_CHECK, since it is perfectly fine to ignore the return value, now that the pointer is guaranteed to be set to NULL upon failure. * src/util/storage_file.c (absolutePathFromBaseFile): Remove now- unnecessary use of ignore_value.
This commit is contained in:
parent
e3042683bd
commit
658952a38a
@ -27,7 +27,6 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include "dirname.h"
|
||||
#include "ignore-value.h"
|
||||
#include "memory.h"
|
||||
#include "virterror_internal.h"
|
||||
|
||||
@ -253,7 +252,7 @@ absolutePathFromBaseFile(const char *base_file, const char *path)
|
||||
if (d_len > INT_MAX)
|
||||
return NULL;
|
||||
|
||||
ignore_value(virAsprintf(&res, "%.*s/%s", (int) d_len, base_file, path));
|
||||
virAsprintf(&res, "%.*s/%s", (int) d_len, base_file, path);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -177,8 +177,7 @@ int virMacAddrCompare (const char *mac1, const char *mac2);
|
||||
|
||||
void virSkipSpaces(const char **str);
|
||||
int virParseNumber(const char **str);
|
||||
int virAsprintf(char **strp, const char *fmt, ...)
|
||||
ATTRIBUTE_FMT_PRINTF(2, 3) ATTRIBUTE_RETURN_CHECK;
|
||||
int virAsprintf(char **strp, const char *fmt, ...) ATTRIBUTE_FMT_PRINTF(2, 3);
|
||||
char *virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)
|
||||
ATTRIBUTE_RETURN_CHECK;
|
||||
char *virStrcpy(char *dest, const char *src, size_t destbytes)
|
||||
|
Loading…
Reference in New Issue
Block a user