reiserfsprogs: fix issues with inline functions

There are several cases in which inline functions are declared in
header files.  This causes warnings with newer versions of gcc.
This patch converts them to static inlines.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
Jeff Mahoney committed 2016-06-06 13:32:05 -04:00
1 parent d5571fa1db
commit df843a34a6
5 files changed
+45 -60

No files matched your search

-16
View File
@@ -27,22 +27,6 @@
#include <sys/mount.h>
/* End Debian mods */
#define STAT_FIELD(Field, Type) \
inline Type misc_device_##Field(const char *device) { \
struct stat st; \
\
if (stat(device, &st) == 0) \
return st.st_##Field; \
\
fprintf(stderr, "Stat of the device '%s' failed.", device); \
exit(8); \
}
STAT_FIELD(mode, mode_t);
STAT_FIELD(rdev, dev_t);
STAT_FIELD(size, off_t);
STAT_FIELD(blocks, blkcnt_t);
void die(const char *fmt, ...)
{
static char buf[1024];