Whamcloud - gitweb
Fix compile error and warnings for old gcc versions
[tools/e2fsprogs.git] / misc / e2undo.c
index 6fb6e44..71991e0 100644 (file)
@@ -81,8 +81,14 @@ struct undo_key_block {
        __le32 magic;           /* KEYBLOCK_MAGIC number */
        __le32 crc;             /* block checksum */
        __le64 reserved;        /* zero */
-
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
        struct undo_key keys[0];        /* keys, which come immediately after */
+#if __GNUC_PREREQ (4, 8)
+#pragma GCC diagnostic pop
+#endif
 };
 
 struct undo_key_info {
@@ -115,7 +121,7 @@ static char *undo_file;
 static void usage(void)
 {
        fprintf(stderr,
-               _("Usage: %s [-f] [-h] [-n] [-v] <transaction file> <filesystem>\n"), prg_name);
+               _("Usage: %s [-f] [-h] [-n] [-o offset] [-v] [-z undo_file] <transaction file> <filesystem>\n"), prg_name);
        exit(1);
 }