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:
Jim Meyering 2010-02-10 12:00:38 +01:00
parent e3042683bd
commit 658952a38a
2 changed files with 2 additions and 4 deletions

View File

@ -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;
}

View File

@ -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)