From: Seung-Woo Kim Date: Fri, 29 Dec 2017 02:33:54 +0000 (+0900) Subject: part: remove build warnings in sprd partition X-Git-Tag: accepted/tizen/5.0/unified/20181106.201708~15 X-Git-Url: http://review.tizen.org/git/?p=profile%2Fmobile%2Fplatform%2Fkernel%2Fu-boot-tm1.git;a=commitdiff_plain;h=10e4c001da219403b1fecca09932a36e01170b99 part: remove build warnings in sprd partition Remove build warnings in sprd partition. Change-Id: I58dc3673b0c48b8c97f583f92133b5f39ecd0b3a Signed-off-by: Seung-Woo Kim --- diff --git a/common/idh_layout.c b/common/idh_layout.c index a3ecfd4..8fbff48 100644 --- a/common/idh_layout.c +++ b/common/idh_layout.c @@ -19,7 +19,9 @@ typedef struct _MTD_PARTITION_STRUCT } MTD_PARTITION_T; +#ifndef MTDPARTS_DEFAULT static unsigned long nandsize = 0; +#endif unsigned char mtdpartbuffer[MTDPARTS_MAXLEN] = "mtdparts=sprd-nand:256k(spl),512k(2ndbl),256k(params),512k(vmjaluna),10m(modem),3840k(fixnv),3840k(backupfixnv),5120k(dsp),3840k(runtimenv),10m(boot),10m(recovery),250m(system),180m(userdata),20m(cache),256k(misc),1m(boot_logo),1m(fastboot_logo),3840k(productinfo),512k(kpanic)"; static MTD_PARTITION_T mtd_partition_cfg[] = { @@ -51,7 +53,7 @@ void create_mtdpart_buffer(unsigned long nandsize, unsigned long realsize) unsigned long str_len; i = 0; - while (strcmp(mtd_partition_cfg[i].name, "cache") != 0) + while (strcmp((char *)mtd_partition_cfg[i].name, "cache") != 0) i++; if (nandsize <= (512 * 1024)) @@ -61,7 +63,7 @@ void create_mtdpart_buffer(unsigned long nandsize, unsigned long realsize) realsize += mtd_partition_cfg[i].size; i = 0; - while (strcmp(mtd_partition_cfg[i].name, "userdata") != 0) + while (strcmp((char *)mtd_partition_cfg[i].name, "userdata") != 0) i++; if (nandsize <= (512 * 1024)) @@ -76,15 +78,15 @@ void create_mtdpart_buffer(unsigned long nandsize, unsigned long realsize) }*/ memset(mtdpartbuffer, 0, MTDPARTS_MAXLEN); - sprintf(mtdpartbuffer, "mtdparts=sprd-nand:"); - str_len = strlen(mtdpartbuffer); + sprintf((char *)mtdpartbuffer, "mtdparts=sprd-nand:"); + str_len = strlen((char *)mtdpartbuffer); i = 0; while (mtd_partition_cfg[i].size) { - sprintf(&mtdpartbuffer[str_len], "%dk(%s),", mtd_partition_cfg[i].size, mtd_partition_cfg[i].name); - str_len = strlen(mtdpartbuffer); + sprintf((char *)&mtdpartbuffer[str_len], "%luk(%s),", mtd_partition_cfg[i].size, (char *)mtd_partition_cfg[i].name); + str_len = strlen((char *)mtdpartbuffer); i++; } - str_len = strlen(mtdpartbuffer); + str_len = strlen((char *)mtdpartbuffer); mtdpartbuffer[str_len - 1] = '\0'; /* delete the last , */ } diff --git a/disk/part.c b/disk/part.c index f2de286..0750522 100644 --- a/disk/part.c +++ b/disk/part.c @@ -408,6 +408,11 @@ int get_partition_info_with_partnum (block_dev_desc_t *dev_desc, int part int get_all_partition_info (block_dev_desc_t *dev_desc, PARTITION_CFG *info, unsigned int *total_partition_num) { +#ifdef CONFIG_EFI_PARTITION + extern int get_all_partition_info_efi(block_dev_desc_t * dev_desc, + PARTITION_CFG * info, + unsigned int *total_partition_num); +#endif switch(dev_desc->part_type){ #ifdef CONFIG_EFI_PARTITION case PART_TYPE_EFI: