lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.0.83.0704072339290.27057@sigma.j-a-k-j.com>
Date:	Sat, 7 Apr 2007 23:40:07 -0400 (EDT)
From:	"John Anthony Kazos Jr." <jakj@...-k-j.com>
To:	aeb@....nl
cc:	linux-kernel@...r.kernel.org
Subject: [PATCH 3/5] partitions: Add conditionals to acorn.c to clear benign
 compiler warnings

From: John Anthony Kazos Jr. <jakj@...-k-j.com>

Adds conditional-compilation directives to fs/partitions/acorn.c to 
prevent compilation of the functions adfs_partition and linux_partition 
which are used only within ACORN_PARTITION_CUMANA and ACORN_PARTITION_ADFS 
sections, thereby preventing unused-function compiler warnings if 
ACORN_PARTITION is defined and neither of the other two are.

Signed-off-by: John Anthony Kazos Jr. <jakj@...-k-j.com>

---

Nothing using these two functions is defined except inside CUMANA and 
ADFS, so without either of those, nothing using these functions is 
compiled, hence the unused-function warning. Both CUMANA and ADFS code use 
both functions so they must be included if either symbol is defined.

--- linux-2.6.20.6-orig/fs/partitions/acorn.c	2007-04-06 16:02:48.000000000 -0400
+++ linux-2.6.20.6-mod/fs/partitions/acorn.c	2007-04-07 21:40:39.000000000 -0400
@@ -25,6 +25,8 @@
 #define PARTITION_RISCIX_SCSI	2
 #define PARTITION_LINUX		9
 
+#if defined(CONFIG_ACORN_PARTITION_CUMANA) || defined(CONFIG_ACORN_PARTITION_ADFS)
+
 static struct adfs_discrecord *
 adfs_partition(struct parsed_partitions *state, char *name, char *data,
 	       unsigned long first_sector, int slot)
@@ -49,6 +51,8 @@ adfs_partition(struct parsed_partitions 
 	return dr;
 }
 
+#endif
+
 #ifdef CONFIG_ACORN_PARTITION_RISCIX
 
 struct riscix_part {
@@ -106,6 +110,8 @@ riscix_partition(struct parsed_partition
 }
 #endif
 
+#if defined(CONFIG_ACORN_PARTITION_CUMANA) || defined(CONFIG_ACORN_PARTITION_ADFS)
+
 #define LINUX_NATIVE_MAGIC 0xdeafa1de
 #define LINUX_SWAP_MAGIC   0xdeafab1e
 
@@ -147,6 +153,8 @@ linux_partition(struct parsed_partitions
 	return slot;
 }
 
+#endif
+
 #ifdef CONFIG_ACORN_PARTITION_CUMANA
 int
 adfspart_check_CUMANA(struct parsed_partitions *state, struct block_device *bdev)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ