Skip to contentSkip to conversation

Fix a bunch of compiler warnings for gcc 4.0

PATCH New Matthew McClintock 1 participant 2 messages Oct 18, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix a bunch of compiler warnings for gcc 4.0

* Fix a bunch of compiler warnings for gcc 4.0

---
commit 7376eb87aaa601f728f9b8e5e9cd2711a67f529e
tree e7fd7c42b85dccbeb3ab29710d165ef37ea0ac5d
parent 88c8f4921fc47fb0eb2384b16586f1bd7f275be7
author Matthew McClintock <[email protected]> Wed, 11 Oct 2006 15:13:01 -0500 committer Matthew McClintock <[email protected]> Wed, 11 Oct 2006 15:13:01 -0500

 board/cds/mpc8541cds/mpc8541cds.c |    4 +---
 board/cds/mpc8548cds/mpc8548cds.c |    2 --
 board/cds/mpc8555cds/mpc8555cds.c |    2 --
 board/mpc8540ads/mpc8540ads.c     |    3 ---
 board/mpc8560ads/mpc8560ads.c     |    2 --
 board/pm854/pm854.c               |    2 --
 board/pm856/pm856.c               |    2 --
 board/stxgp3/stxgp3.c             |    2 --
 board/tqm85xx/tqm85xx.c           |    2 --
 common/cmd_bootm.c                |    2 +-
 common/ft_build.c                 |   10 +++++-----
 cpu/mpc85xx/pci.c                 |    5 +++++
 include/ft_build.h                |    2 ++
 include/pci.h                     |    3 +++
 14 files changed, 17 insertions(+), 26 deletions(-)
board/cds/mpc8541cds/mpc8541cds.c +1 -3
index c2b3009..a42904c 100644
@@ -497,8 +497,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller **hose);
-
-	pci_mpc85xx_init(&hose);
+	pci_mpc85xx_init(hose);
 #endif
 }
board/cds/mpc8548cds/mpc8548cds.c +0 -2
index 6eedb4a..ab5835d 100644
@@ -322,8 +322,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller **hose);
-
 	pci_mpc85xx_init(&hose);
 #endif
 }
board/cds/mpc8555cds/mpc8555cds.c +0 -2
index 012181c..d980ea6 100644
@@ -497,8 +497,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(hose);
 #endif
 }
board/mpc8540ads/mpc8540ads.c +0 -3
index fbcb397..914e51a 100644
@@ -33,7 +33,6 @@ #include <spd.h>
 
 #if defined(CONFIG_OF_FLAT_TREE)
 #include <ft_build.h>
-extern void ft_cpu_setup(void *blob, bd_t *bd);
 #endif
 
 
@@ -327,8 +326,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/mpc8560ads/mpc8560ads.c +0 -2
index f9d75e8..c1572a3 100644
@@ -539,8 +539,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/pm854/pm854.c +0 -2
index 94c492f..6ead1d0 100644
@@ -289,8 +289,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/pm856/pm856.c +0 -2
index 5044708..a100754 100644
@@ -442,8 +442,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/stxgp3/stxgp3.c +0 -2
index 2b3949c..a58c043 100644
@@ -375,8 +375,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/tqm85xx/tqm85xx.c +0 -2
index befe8b7..9f03ec5 100644
@@ -408,8 +408,6 @@ #endif /* CONFIG_PCI */
 void pci_init_board (void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init (struct pci_controller *hose);
-
 	pci_mpc85xx_init (&hose);
 #endif /* CONFIG_PCI */
 }
common/cmd_bootm.c +1 -1
index 04bce76..b785b9e 100644
@@ -623,7 +623,7 @@ #ifdef CONFIG_OF_FLAT_TREE
 	/* Look for a '-' which indicates to ignore the ramdisk argument */
 	if (argc >= 3 && strcmp(argv[2], "-") ==  0) {
 			debug ("Skipping initrd\n");
-			data = 0;
+			len = data = 0;
 		}
 	else
 #endif
common/ft_build.c +5 -5
index b5937e3..c6a018d 100644
@@ -87,9 +87,9 @@ static int lookup_string(struct ft_cxt *
 
 	p = cxt->p;
 	while (p < cxt->p_end) {
-		if (strcmp(p, name) == 0)
+		if (strcmp((char *)p, name) == 0)
 			return p - cxt->p;
-		p += strlen(p) + 1;
+		p += strlen((char *)p) + 1;
 	}
 
 	return -1;
@@ -143,9 +143,9 @@ void ft_init_cxt(struct ft_cxt *cxt, voi
 	cxt->p_rsvmap += SIZE_OF_RSVMAP_ENTRY;
 	}
 
-	cxt->p_start = (char*)bph + bph->off_dt_struct;
-	cxt->p_end = (char *)bph + bph->totalsize;
-	cxt->p = (char *)bph + bph->off_dt_strings;
+	cxt->p_start = (u8 *)bph + bph->off_dt_struct;
+	cxt->p_end = (u8 *)bph + bph->totalsize;
+	cxt->p = (u8 *)bph + bph->off_dt_strings;
 }
 
 /* add a reserver physical area to the rsvmap */
cpu/mpc85xx/pci.c +5 -0
index cfb7dcd..84f839a 100644
@@ -29,6 +29,9 @@ #include <common.h>
 #include <asm/cpm_85xx.h>
 #include <pci.h>
 
+#if defined(CONFIG_OF_FLAT_TREE)
+#include <ft_build.h>
+#endif
 
 #if defined(CONFIG_PCI)
 
@@ -42,7 +45,9 @@ pci_mpc85xx_init(struct pci_controller *
 
 	volatile immap_t    *immap = (immap_t *)CFG_CCSRBAR;
 	volatile ccsr_pcix_t *pcix = &immap->im_pcix;
+#ifdef CONFIG_MPC85XX_PCI2
 	volatile ccsr_pcix_t *pcix2 = &immap->im_pcix2;
+#endif
 	volatile ccsr_gur_t *gur = &immap->im_gur;
 	struct pci_controller * hose;
 
include/ft_build.h +2 -0
index f515687..89c689c 100644
@@ -64,6 +64,8 @@ void *ft_get_prop(void *bphp, const char
 
 #ifdef CONFIG_OF_BOARD_SETUP
 void ft_board_setup(void *blob, bd_t *bd);
+void ft_cpu_setup(void *blob, bd_t *bd);
+void ft_pci_setup(void *blob, bd_t *bd);
 #endif
 
 #endif
include/pci.h +3 -0
index e0e8783..cc216e1 100644
@@ -501,4 +501,7 @@ #ifdef CONFIG_MPC824X
 extern void pci_mpc824x_init (struct pci_controller *hose);
 #endif
 
+#ifdef CONFIG_MPC85xx 
+extern void pci_mpc85xx_init (struct pci_controller *hose);
+#endif
 #endif	/* _PCI_H */
#1 lore raw

PATCH 1/1 Fix a bunch of compiler warnings for gcc 4.0

Please note this patch is already in my or Jon's git tree.

Quoted 256 lines · Matthew McClintock

* Fix a bunch of compiler warnings for gcc 4.0

---
commit 7376eb87aaa601f728f9b8e5e9cd2711a67f529e
tree e7fd7c42b85dccbeb3ab29710d165ef37ea0ac5d
parent 88c8f4921fc47fb0eb2384b16586f1bd7f275be7
author Matthew McClintock <[email protected]> Wed, 11 Oct 2006 15:13:01 -0500 committer Matthew McClintock <[email protected]> Wed, 11 Oct 2006 15:13:01 -0500

 board/cds/mpc8541cds/mpc8541cds.c |    4 +---
 board/cds/mpc8548cds/mpc8548cds.c |    2 --
 board/cds/mpc8555cds/mpc8555cds.c |    2 --
 board/mpc8540ads/mpc8540ads.c     |    3 ---
 board/mpc8560ads/mpc8560ads.c     |    2 --
 board/pm854/pm854.c               |    2 --
 board/pm856/pm856.c               |    2 --
 board/stxgp3/stxgp3.c             |    2 --
 board/tqm85xx/tqm85xx.c           |    2 --
 common/cmd_bootm.c                |    2 +-
 common/ft_build.c                 |   10 +++++-----
 cpu/mpc85xx/pci.c                 |    5 +++++
 include/ft_build.h                |    2 ++
 include/pci.h                     |    3 +++
 14 files changed, 17 insertions(+), 26 deletions(-)
board/cds/mpc8541cds/mpc8541cds.c +1 -3
index c2b3009..a42904c 100644
@@ -497,8 +497,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller **hose);
-
-	pci_mpc85xx_init(&hose);
+	pci_mpc85xx_init(hose);
 #endif
 }
board/cds/mpc8548cds/mpc8548cds.c +0 -2
index 6eedb4a..ab5835d 100644
@@ -322,8 +322,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller **hose);
-
 	pci_mpc85xx_init(&hose);
 #endif
 }
board/cds/mpc8555cds/mpc8555cds.c +0 -2
index 012181c..d980ea6 100644
@@ -497,8 +497,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(hose);
 #endif
 }
board/mpc8540ads/mpc8540ads.c +0 -3
index fbcb397..914e51a 100644
@@ -33,7 +33,6 @@ #include <spd.h>
 
 #if defined(CONFIG_OF_FLAT_TREE)
 #include <ft_build.h>
-extern void ft_cpu_setup(void *blob, bd_t *bd);
 #endif
 
 
@@ -327,8 +326,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/mpc8560ads/mpc8560ads.c +0 -2
index f9d75e8..c1572a3 100644
@@ -539,8 +539,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/pm854/pm854.c +0 -2
index 94c492f..6ead1d0 100644
@@ -289,8 +289,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/pm856/pm856.c +0 -2
index 5044708..a100754 100644
@@ -442,8 +442,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/stxgp3/stxgp3.c +0 -2
index 2b3949c..a58c043 100644
@@ -375,8 +375,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
board/tqm85xx/tqm85xx.c +0 -2
index befe8b7..9f03ec5 100644
@@ -408,8 +408,6 @@ #endif /* CONFIG_PCI */
 void pci_init_board (void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init (struct pci_controller *hose);
-
 	pci_mpc85xx_init (&hose);
 #endif /* CONFIG_PCI */
 }
common/cmd_bootm.c +1 -1
index 04bce76..b785b9e 100644
@@ -623,7 +623,7 @@ #ifdef CONFIG_OF_FLAT_TREE
 	/* Look for a '-' which indicates to ignore the ramdisk argument */
 	if (argc >= 3 && strcmp(argv[2], "-") ==  0) {
 			debug ("Skipping initrd\n");
-			data = 0;
+			len = data = 0;
 		}
 	else
 #endif
common/ft_build.c +5 -5
index b5937e3..c6a018d 100644
@@ -87,9 +87,9 @@ static int lookup_string(struct ft_cxt *
 
 	p = cxt->p;
 	while (p < cxt->p_end) {
-		if (strcmp(p, name) == 0)
+		if (strcmp((char *)p, name) == 0)
 			return p - cxt->p;
-		p += strlen(p) + 1;
+		p += strlen((char *)p) + 1;
 	}
 
 	return -1;
@@ -143,9 +143,9 @@ void ft_init_cxt(struct ft_cxt *cxt, voi
 	cxt->p_rsvmap += SIZE_OF_RSVMAP_ENTRY;
 	}
 
-	cxt->p_start = (char*)bph + bph->off_dt_struct;
-	cxt->p_end = (char *)bph + bph->totalsize;
-	cxt->p = (char *)bph + bph->off_dt_strings;
+	cxt->p_start = (u8 *)bph + bph->off_dt_struct;
+	cxt->p_end = (u8 *)bph + bph->totalsize;
+	cxt->p = (u8 *)bph + bph->off_dt_strings;
 }
 
 /* add a reserver physical area to the rsvmap */
cpu/mpc85xx/pci.c +5 -0
index cfb7dcd..84f839a 100644
@@ -29,6 +29,9 @@ #include <common.h>
 #include <asm/cpm_85xx.h>
 #include <pci.h>
 
+#if defined(CONFIG_OF_FLAT_TREE)
+#include <ft_build.h>
+#endif
 
 #if defined(CONFIG_PCI)
 
@@ -42,7 +45,9 @@ pci_mpc85xx_init(struct pci_controller *
 
 	volatile immap_t    *immap = (immap_t *)CFG_CCSRBAR;
 	volatile ccsr_pcix_t *pcix = &immap->im_pcix;
+#ifdef CONFIG_MPC85XX_PCI2
 	volatile ccsr_pcix_t *pcix2 = &immap->im_pcix2;
+#endif
 	volatile ccsr_gur_t *gur = &immap->im_gur;
 	struct pci_controller * hose;
 
include/ft_build.h +2 -0
index f515687..89c689c 100644
@@ -64,6 +64,8 @@ void *ft_get_prop(void *bphp, const char
 
 #ifdef CONFIG_OF_BOARD_SETUP
 void ft_board_setup(void *blob, bd_t *bd);
+void ft_cpu_setup(void *blob, bd_t *bd);
+void ft_pci_setup(void *blob, bd_t *bd);
 #endif
 
 #endif
include/pci.h +3 -1
index e0e8783..cc216e1 100644
@@ -501,4 +501,7 @@ #ifdef CONFIG_MPC824X
 extern void pci_mpc824x_init (struct pci_controller *hose);
 #endif
 
+#ifdef CONFIG_MPC85xx 
+extern void pci_mpc85xx_init (struct pci_controller *hose);
+#endif
 #endif	/* _PCI_H */
 
 
 
-------------------------------------------------------------------------

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users