diff -upk.orig lilo-22.7.3.orig/cfg.c lilo-22.7.3/cfg.c --- lilo-22.7.3.orig/cfg.c 2006-12-29 13:55:09 +0000 +++ lilo-22.7.3/cfg.c 2006-12-29 13:57:46 +0000 @@ -263,7 +263,7 @@ int cfg_open(char *name) } -void cfg_error(char *msg,...) +void __attribute__ ((format (printf, 1, 2))) cfg_error(char *msg,...) { va_list ap; diff -upk.orig lilo-22.7.3.orig/cfg.h lilo-22.7.3/cfg.h --- lilo-22.7.3.orig/cfg.h 2006-12-29 13:55:09 +0000 +++ lilo-22.7.3/cfg.h 2006-12-29 13:57:46 +0000 @@ -38,7 +38,7 @@ int cfg_open(char *name); /* Opens the configuration file. Returns the file descriptor of the open file. */ -void cfg_error(char *msg,...); +void cfg_error(char *msg,...) __attribute__ ((format (printf, 1, 2))); /* Signals an error while parsing the configuration file and terminates the program. */ diff -upk.orig lilo-22.7.3.orig/common.c lilo-22.7.3/common.c --- lilo-22.7.3.orig/common.c 2006-12-29 13:55:09 +0000 +++ lilo-22.7.3/common.c 2006-12-29 13:57:46 +0000 @@ -39,7 +39,7 @@ unsigned int prt_map[PRTMAP_SIZE+1]; int curr_prt_map; #endif /* !__MSDOS__ */ -/*volatile*/ void pdie(char *msg) +/*volatile*/ void pdie(const char *msg) { fflush(stdout); #if !__MSDOS__ @@ -51,7 +51,7 @@ int curr_prt_map; } -/*volatile*/ void die(char *fmt,...) +/*volatile*/ void __attribute__ ((format (printf, 1, 2))) die(const char *fmt,...) { va_list ap; diff -upk.orig lilo-22.7.3.orig/common.h lilo-22.7.3/common.h --- lilo-22.7.3.orig/common.h 2006-12-29 13:55:09 +0000 +++ lilo-22.7.3/common.h 2006-12-29 13:57:46 +0000 @@ -394,11 +394,11 @@ extern char *identify; /* in identify.c #define comma (cc(First)|cc(Second)|cc(Third)|cc(Bitmap)|cc(Chain)|cc(Mbr)|cc(Mbr2)) -/*volatile*/ void pdie(char *msg); +/*volatile*/ void pdie(const char *msg) __attribute__ ((noreturn)); /* Do a perror and then exit. */ -/*volatile*/ void die(char *fmt,...); +/*volatile*/ void die(const char *fmt,...) __attribute__ ((noreturn)) __attribute__ ((format (printf, 1, 2))); /* fprintf an error message and then exit. */ diff -upk.orig lilo-22.7.3.orig/device.c lilo-22.7.3/device.c --- lilo-22.7.3.orig/device.c 2006-12-29 13:55:09 +0000 +++ lilo-22.7.3/device.c 2006-12-29 13:57:46 +0000 @@ -625,7 +625,7 @@ unsigned int register_bios(int bios, int *(int*)&buff.sector[PART_TABLE_OFFSET-6] = serial; if (*(short*)&buff.sector[PART_TABLE_OFFSET - 2] == 0) - *(short*)&buff.sector[PART_TABLE_OFFSET - 2] = MAGIC_SERIAL; + *(unsigned short*)&buff.sector[PART_TABLE_OFFSET - 2] = MAGIC_SERIAL; if (verbose) printf("Assigning new Volume ID to (%04X) '%s' ID = %08X\n", device, dev.name, (int)serial); diff -upk.orig lilo-22.7.3.orig/geometry.c lilo-22.7.3/geometry.c --- lilo-22.7.3.orig/geometry.c 2006-12-29 13:55:09 +0000 +++ lilo-22.7.3/geometry.c 2006-12-29 14:00:40 +0000 @@ -757,9 +757,9 @@ void geo_query_dev(GEOMETRY *geo,int dev if ((MAJOR(device)>=120 && MAJOR(device)<=127) || (MAJOR(device)>=240 && MAJOR(device)<=254) ) - die("Linux experimental device 0x04x needs to be defined.\n" + die("Linux experimental device %#04x needs to be defined.\n" "Check 'man lilo.conf' under 'disk=' and 'max-partitions='", device); - else die("Sorry, don't know how to handle device 0x%04x",device); + else die("Sorry, don't know how to handle device %#04x",device); } if (get_all) dev_close(&dev); if (verbose>=5) printf("exit geo_query_dev\n"); @@ -1243,7 +1243,7 @@ int pass; } /* end of geo_get */ -int geo_open(GEOMETRY *geo,char *name,int flags) +int geo_open(GEOMETRY *geo,const char *name,int flags) { char *here; int user_dev,block_size; diff -upk.orig lilo-22.7.3.orig/geometry.h lilo-22.7.3/geometry.h --- lilo-22.7.3.orig/geometry.h 2006-12-29 13:55:09 +0000 +++ lilo-22.7.3/geometry.h 2006-12-29 13:57:50 +0000 @@ -131,7 +131,7 @@ void geo_get(GEOMETRY *geo,int device,in is retrieved and the other geometry information is undefined. */ -int geo_open(GEOMETRY *geo,char *name,int flags); +int geo_open(GEOMETRY *geo,const char *name,int flags); /* Opens the specified file or block device, obtains the necessary geometry information and returns the file descriptor. If the name contains a BIOS device specification (xxx:yyy), it is removed and stored in the geometry diff -upk.orig lilo-22.7.3.orig/partition.c lilo-22.7.3/partition.c --- lilo-22.7.3.orig/partition.c 2006-12-29 13:55:09 +0000 +++ lilo-22.7.3/partition.c 2006-12-29 13:57:50 +0000 @@ -380,7 +380,7 @@ static void add_rule(unsigned char bios, int i; if (curr_prt_map == PRTMAP_SIZE) - cfg_error("Too many change rules (more than %s)",PRTMAP_SIZE); + cfg_error("Too many change rules (more than %d)",PRTMAP_SIZE); if (verbose >= 3) printf(" Adding rule: disk 0x%02x, offset 0x%x, 0x%02x -> 0x%02x\n", bios,PART_TABLE_OFFSET+offset,expect,set); @@ -393,7 +393,7 @@ static void add_rule(unsigned char bios, (prt_map[i] >> 24) == expect) die("Redundant rule: disk 0x%02x, offset 0x%x: 0x%02x -> 0x%02x " "-> 0x%02x",bios,PART_TABLE_OFFSET+offset, - (prt_map[i] >> 16) & 0xff,expect,set); + (unsigned int)(prt_map[i] >> 16) & 0xff,expect,set); } curr_prt_map++; }