+2010-07-30 Robert Millan <rmh@gnu.org>
+
+ * include/grub/emu/misc.h (grub_make_system_path_relative_to_its_root)
+ (xmalloc, xrealloc, xstrdup, xasprintf): Add
+ `warn_unused_result' attribute.
+ * include/grub/misc.h (grub_strdup, grub_strndup, grub_strlen)
+ (grub_xasprintf, grub_xvasprintf): Likewise.
+ * include/grub/emu/misc.h (xasprintf): Remove duplicate prototype.
+
2010-07-29 Robert Millan <rmh@gnu.org>
* util/grub-probe.c (PRINT_FS_LABEL): New enum value.
void grub_init_all (void);
void grub_fini_all (void);
-char *grub_make_system_path_relative_to_its_root (const char *path);
+char *grub_make_system_path_relative_to_its_root (const char *path) __attribute__ ((warn_unused_result));
-void * EXPORT_FUNC(xmalloc) (grub_size_t size);
-void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size);
-char * EXPORT_FUNC(xstrdup) (const char *str);
-char * EXPORT_FUNC(xasprintf) (const char *fmt, ...);
+void * EXPORT_FUNC(xmalloc) (grub_size_t size) __attribute__ ((warn_unused_result));
+void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size) __attribute__ ((warn_unused_result));
+char * EXPORT_FUNC(xstrdup) (const char *str) __attribute__ ((warn_unused_result));
+char * EXPORT_FUNC(xasprintf) (const char *fmt, ...) __attribute__ ((warn_unused_result));
void EXPORT_FUNC(grub_util_warn) (const char *fmt, ...);
void EXPORT_FUNC(grub_util_info) (const char *fmt, ...);
int EXPORT_FUNC(asprintf) (char **buf, const char *fmt, ...);
#endif
-char * EXPORT_FUNC(xasprintf) (const char *fmt, ...);
extern char * canonicalize_file_name (const char *path);
#ifdef HAVE_DEVICE_MAPPER
}
}
-char *EXPORT_FUNC(grub_strdup) (const char *s);
-char *EXPORT_FUNC(grub_strndup) (const char *s, grub_size_t n);
+char *EXPORT_FUNC(grub_strdup) (const char *s) __attribute__ ((warn_unused_result));
+char *EXPORT_FUNC(grub_strndup) (const char *s, grub_size_t n) __attribute__ ((warn_unused_result));
void *EXPORT_FUNC(grub_memset) (void *s, int c, grub_size_t n);
-grub_size_t EXPORT_FUNC(grub_strlen) (const char *s);
+grub_size_t EXPORT_FUNC(grub_strlen) (const char *s) __attribute__ ((warn_unused_result));
int EXPORT_FUNC(grub_printf) (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
int EXPORT_FUNC(grub_printf_) (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
int EXPORT_FUNC(grub_vsnprintf) (char *str, grub_size_t n, const char *fmt,
va_list args);
char *EXPORT_FUNC(grub_xasprintf) (const char *fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
-char *EXPORT_FUNC(grub_xvasprintf) (const char *fmt, va_list args);
+ __attribute__ ((format (printf, 1, 2))) __attribute__ ((warn_unused_result));
+char *EXPORT_FUNC(grub_xvasprintf) (const char *fmt, va_list args) __attribute__ ((warn_unused_result));
void EXPORT_FUNC(grub_exit) (void) __attribute__ ((noreturn));
void EXPORT_FUNC(grub_abort) (void) __attribute__ ((noreturn));
grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,