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.
This commit is contained in:
Robert Millan 2010-07-30 11:27:02 +02:00
parent 0806b63c09
commit f7790cdd5d
3 changed files with 19 additions and 11 deletions

View file

@ -1,3 +1,12 @@
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.

View file

@ -26,12 +26,12 @@ extern const char *program_name;
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, ...);
@ -45,7 +45,6 @@ int EXPORT_FUNC(vasprintf) (char **buf, const char *fmt, va_list ap);
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

View file

@ -231,10 +231,10 @@ grub_strtol (const char *str, char **end, int base)
}
}
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)));
@ -261,8 +261,8 @@ int EXPORT_FUNC(grub_snprintf) (char *str, grub_size_t n, const char *fmt, ...)
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,