mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
gencromfs.c:1171:3: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
This commit is contained in:
committed by
Gregory Nutt
parent
5c9e72f99d
commit
7fef81ea94
+6
-2
@@ -72,6 +72,8 @@
|
|||||||
# define HOST_TGTSWAP 1
|
# define HOST_TGTSWAP 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define UNUSED(a) ((void)(a))
|
||||||
|
|
||||||
/* mkstemp() has been giving me errors on Cygwin */
|
/* mkstemp() has been giving me errors on Cygwin */
|
||||||
|
|
||||||
#undef USE_MKSTEMP
|
#undef USE_MKSTEMP
|
||||||
@@ -1139,7 +1141,8 @@ static int dir_notempty(const char *dirpath, const char *name,
|
|||||||
char *path;
|
char *path;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
asprintf(&path, "%s/%s", dirpath, name);
|
ret = asprintf(&path, "%s/%s", dirpath, name);
|
||||||
|
UNUSED(ret);
|
||||||
|
|
||||||
/* stat() should not fail for any reason */
|
/* stat() should not fail for any reason */
|
||||||
|
|
||||||
@@ -1168,7 +1171,8 @@ static int process_direntry(const char *dirpath, const char *name,
|
|||||||
char *path;
|
char *path;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
asprintf(&path, "%s/%s", dirpath, name);
|
ret = asprintf(&path, "%s/%s", dirpath, name);
|
||||||
|
UNUSED(ret);
|
||||||
|
|
||||||
ret = stat(path, &buf);
|
ret = stat(path, &buf);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user