diff --git a/e2fsprogs/old_e2fsprogs/blkid/blkidP.h b/e2fsprogs/old_e2fsprogs/blkid/blkidP.h
index d6b2b42..bbadc8e 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/blkidP.h
+++ b/e2fsprogs/old_e2fsprogs/blkid/blkidP.h
@@ -179,8 +179,4 @@
 extern blkid_dev blkid_new_dev(void);
 extern void blkid_free_dev(blkid_dev dev);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
diff --git a/e2fsprogs/old_e2fsprogs/blkid/cache.c b/e2fsprogs/old_e2fsprogs/blkid/cache.c
index d1d2914..251e499 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/cache.c
+++ b/e2fsprogs/old_e2fsprogs/blkid/cache.c
@@ -115,7 +115,7 @@
 			argv[0], ret);
 		exit(1);
 	}
-	if ((ret = blkid_probe_all(cache) < 0))
+	if ((ret = blkid_probe_all(cache)) < 0)
 		fprintf(stderr, "error probing devices\n");
 
 	blkid_put_cache(cache);
diff --git a/e2fsprogs/old_e2fsprogs/blkid/dev.c b/e2fsprogs/old_e2fsprogs/blkid/dev.c
index bb0cc91..260e49c 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/dev.c
+++ b/e2fsprogs/old_e2fsprogs/blkid/dev.c
@@ -153,7 +153,7 @@
 void usage(char *prog)
 {
 	fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask]\n", prog);
-	fprintf(stderr, "\tList all devices and exit\n", prog);
+	fprintf(stderr, "\tList all devices and exit\n");
 	exit(1);
 }
 
@@ -176,7 +176,7 @@
 		case 'm':
 			blkid_debug_mask = strtoul (optarg, &tmp, 0);
 			if (*tmp) {
-				fprintf(stderr, "Invalid debug mask: %d\n",
+				fprintf(stderr, "Invalid debug mask: %s\n",
 					optarg);
 				exit(1);
 			}
diff --git a/e2fsprogs/old_e2fsprogs/blkid/read.c b/e2fsprogs/old_e2fsprogs/blkid/read.c
index f795a5d..feeda51 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/read.c
+++ b/e2fsprogs/old_e2fsprogs/blkid/read.c
@@ -385,7 +385,7 @@
 			continue;
 		end = strlen(buf) - 1;
 		/* Continue reading next line if it ends with a backslash */
-		while (buf[end] == '\\' && end < sizeof(buf) - 2 &&
+		while (end < sizeof(buf) - 2 && buf[end] == '\\' &&
 		       fgets(buf + end, sizeof(buf) - end, file)) {
 			end = strlen(buf) - 1;
 			lineno++;
diff --git a/e2fsprogs/old_e2fsprogs/blkid/tag.c b/e2fsprogs/old_e2fsprogs/blkid/tag.c
index 8337b46..7424ede 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/tag.c
+++ b/e2fsprogs/old_e2fsprogs/blkid/tag.c
@@ -356,7 +356,7 @@
 	fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask] device "
 		"[type value]\n",
 		prog);
-	fprintf(stderr, "\tList all tags for a device and exit\n", prog);
+	fprintf(stderr, "\tList all tags for a device and exit\n");
 	exit(1);
 }
 
@@ -382,7 +382,7 @@
 		case 'm':
 			blkid_debug_mask = strtoul (optarg, &tmp, 0);
 			if (*tmp) {
-				fprintf(stderr, "Invalid debug mask: %d\n",
+				fprintf(stderr, "Invalid debug mask: %s\n",
 					optarg);
 				exit(1);
 			}
@@ -407,7 +407,7 @@
 
 	dev = blkid_get_dev(cache, devname, flags);
 	if (!dev) {
-		fprintf(stderr, "%s: cannot find device in blkid cache\n");
+		fprintf(stderr, "%s: cannot find device in blkid cache\n", devname);
 		exit(1);
 	}
 	if (search_type) {
diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c
index 373e8ce..8400a92 100644
--- a/e2fsprogs/old_e2fsprogs/e2fsck.c
+++ b/e2fsprogs/old_e2fsprogs/e2fsck.c
@@ -1050,7 +1050,7 @@
 	refcount->size = size;
 	bytes = (size_t) (size * sizeof(struct ea_refcount_el));
 #ifdef DEBUG
-	printf("Refcount allocated %d entries, %d bytes.\n",
+	printf("Refcount allocated %d entries, %lu bytes.\n",
 	       refcount->size, bytes);
 #endif
 	retval = ext2fs_get_mem(bytes, &refcount->list);
@@ -3424,7 +3424,7 @@
 				continue;
 			}
 			if ((inode->i_links_count || inode->i_blocks ||
-			     inode->i_blocks || inode->i_block[0]) &&
+			     inode->i_block[0]) &&
 			    fix_problem(ctx, PR_1_JOURNAL_INODE_NOT_CLEAR,
 					&pctx)) {
 				memset(inode, 0, inode_size);
@@ -12195,11 +12195,7 @@
 void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int size,
 			     const char *description)
 {
-	void *ret;
-	char buf[256];
-
-	ret = xzalloc(size);
-	return ret;
+	return xzalloc(size);
 }
 
 static char *string_copy(const char *str, int len)
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/initialize.c b/e2fsprogs/old_e2fsprogs/ext2fs/initialize.c
index da2d151..240335b 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/initialize.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/initialize.c
@@ -83,7 +83,7 @@
 	if (rsv_gdb > EXT2_ADDR_PER_BLOCK(sb))
 		rsv_gdb = EXT2_ADDR_PER_BLOCK(sb);
 #ifdef RES_GDT_DEBUG
-	printf("max_blocks %lu, rsv_groups = %lu, rsv_gdb = %lu\n",
+	printf("max_blocks %lu, rsv_groups = %lu, rsv_gdb = %u\n",
 	       max_blocks, rsv_groups, rsv_gdb);
 #endif
 
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/unix_io.c b/e2fsprogs/old_e2fsprogs/ext2fs/unix_io.c
index 474f073..3c95829 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/unix_io.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/unix_io.c
@@ -544,7 +544,7 @@
 		/* If it's in the cache, use it! */
 		if ((cache = find_cached_block(data, block, &reuse[0]))) {
 #ifdef DEBUG
-			printf("Using cached block %d\n", block);
+			printf("Using cached block %lu\n", block);
 #endif
 			memcpy(cp, cache->buf, channel->block_size);
 			count--;
@@ -560,7 +560,7 @@
 			if (find_cached_block(data, block+i, &reuse[i]))
 				break;
 #ifdef DEBUG
-		printf("Reading %d blocks starting at %d\n", i, block);
+		printf("Reading %d blocks starting at %lu\n", i, block);
 #endif
 		if ((retval = raw_read_blk(channel, data, block, i, cp)))
 			return retval;
diff --git a/e2fsprogs/old_e2fsprogs/fsck.c b/e2fsprogs/old_e2fsprogs/fsck.c
index 3a0743b..91cce97 100644
--- a/e2fsprogs/old_e2fsprogs/fsck.c
+++ b/e2fsprogs/old_e2fsprogs/fsck.c
@@ -1239,7 +1239,6 @@
 						progress_fd = 0;
 					else {
 						goto next_arg;
-						i++;
 					}
 				}
 				break;
diff --git a/e2fsprogs/old_e2fsprogs/mke2fs.c b/e2fsprogs/old_e2fsprogs/mke2fs.c
index 35d717a..e44d986 100644
--- a/e2fsprogs/old_e2fsprogs/mke2fs.c
+++ b/e2fsprogs/old_e2fsprogs/mke2fs.c
@@ -385,7 +385,7 @@
 			     struct progress_struct *progress,
 			     blk_t *ret_blk, int *ret_count)
 {
-	int		j, count, next_update, next_update_incr;
+	int		j, count, next_update;
 	static char	*buf;
 	errcode_t	retval;
 
@@ -403,9 +403,7 @@
 	}
 	/* OK, do the write loop */
 	next_update = 0;
-	next_update_incr = num / 100;
-	if (next_update_incr < 1)
-		next_update_incr = 1;
+
 	for (j=0; j < num; j += STRIDE_LENGTH, blk += STRIDE_LENGTH) {
 		count = num - j;
 		if (count > STRIDE_LENGTH)
diff --git a/e2fsprogs/old_e2fsprogs/util.c b/e2fsprogs/old_e2fsprogs/util.c
index a61abc2..e6758e0 100644
--- a/e2fsprogs/old_e2fsprogs/util.c
+++ b/e2fsprogs/old_e2fsprogs/util.c
@@ -117,7 +117,7 @@
 		}
 		if (strcmp(token, "device") == 0) {
 			*journal_device = blkid_get_devname(NULL, arg, NULL);
-			if (!journal_device) {
+			if (!*journal_device) {
 				journal_usage++;
 				continue;
 			}
