Subject: Fix some warnings when copmpile on cygwin When compiling on Cygwin there aere some warnings. Signed-off-by: Dmitry Torokhov --- lib/gen_crc32table.c | 4 ++-- scripts/kconfig/Makefile | 2 ++ scripts/mod/file2alias.c | 34 +++++++++++++++++----------------- scripts/mod/sumversion.c | 2 +- 4 files changed, 22 insertions(+), 20 deletions(-) Index: linux-2.6.12/scripts/mod/sumversion.c =================================================================== --- linux-2.6.12.orig/scripts/mod/sumversion.c +++ linux-2.6.12/scripts/mod/sumversion.c @@ -218,7 +218,7 @@ static void md4_final_ascii(struct md4_c cpu_to_le32_array(mctx->hash, sizeof(mctx->hash) / sizeof(uint32_t)); snprintf(out, len, "%08X%08X%08X%08X", - mctx->hash[0], mctx->hash[1], mctx->hash[2], mctx->hash[3]); + (unsigned)mctx->hash[0], (unsigned)mctx->hash[1], (unsigned)mctx->hash[2], (unsigned)mctx->hash[3]); } static inline void add_char(unsigned char c, struct md4_ctx *md) Index: linux-2.6.12/scripts/mod/file2alias.c =================================================================== --- linux-2.6.12.orig/scripts/mod/file2alias.c +++ linux-2.6.12/scripts/mod/file2alias.c @@ -170,13 +170,13 @@ static int do_ieee1394_entry(const char strcpy(alias, "ieee1394:"); ADD(alias, "ven", id->match_flags & IEEE1394_MATCH_VENDOR_ID, - id->vendor_id); + (unsigned)id->vendor_id); ADD(alias, "mo", id->match_flags & IEEE1394_MATCH_MODEL_ID, - id->model_id); + (unsigned)id->model_id); ADD(alias, "sp", id->match_flags & IEEE1394_MATCH_SPECIFIER_ID, - id->specifier_id); + (unsigned)id->specifier_id); ADD(alias, "ver", id->match_flags & IEEE1394_MATCH_VERSION, - id->version); + (unsigned)id->version); return 1; } @@ -197,10 +197,10 @@ static int do_pci_entry(const char *file id->class_mask = TO_NATIVE(id->class_mask); strcpy(alias, "pci:"); - ADD(alias, "v", id->vendor != PCI_ANY_ID, id->vendor); - ADD(alias, "d", id->device != PCI_ANY_ID, id->device); - ADD(alias, "sv", id->subvendor != PCI_ANY_ID, id->subvendor); - ADD(alias, "sd", id->subdevice != PCI_ANY_ID, id->subdevice); + ADD(alias, "v", id->vendor != PCI_ANY_ID, (unsigned)id->vendor); + ADD(alias, "d", id->device != PCI_ANY_ID, (unsigned)id->device); + ADD(alias, "sv", id->subvendor != PCI_ANY_ID, (unsigned)id->subvendor); + ADD(alias, "sd", id->subdevice != PCI_ANY_ID, (unsigned)id->subdevice); baseclass = (id->class) >> 16; baseclass_mask = (id->class_mask) >> 16; @@ -214,7 +214,7 @@ static int do_pci_entry(const char *file || (interface_mask != 0 && interface_mask != 0xFF)) { fprintf(stderr, "*** Warning: Can't handle masks in %s:%04X\n", - filename, id->class_mask); + filename, (unsigned) id->class_mask); return 0; } @@ -236,13 +236,13 @@ static int do_ccw_entry(const char *file strcpy(alias, "ccw:"); ADD(alias, "t", id->match_flags&CCW_DEVICE_ID_MATCH_CU_TYPE, - id->cu_type); + (unsigned)id->cu_type); ADD(alias, "m", id->match_flags&CCW_DEVICE_ID_MATCH_CU_MODEL, - id->cu_model); + (unsigned)id->cu_model); ADD(alias, "dt", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE, - id->dev_type); + (unsigned)id->dev_type); ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE, - id->dev_model); + (unsigned)id->dev_model); return 1; } @@ -313,10 +313,10 @@ static int do_pcmcia_entry(const char *f id->function); ADD(alias, "pfn", id->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO, id->device_no); - ADD(alias, "pa", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID1, id->prod_id_hash[0]); - ADD(alias, "pb", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID2, id->prod_id_hash[1]); - ADD(alias, "pc", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID3, id->prod_id_hash[2]); - ADD(alias, "pd", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID4, id->prod_id_hash[3]); + ADD(alias, "pa", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID1, (unsigned)id->prod_id_hash[0]); + ADD(alias, "pb", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID2, (unsigned)id->prod_id_hash[1]); + ADD(alias, "pc", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID3, (unsigned)id->prod_id_hash[2]); + ADD(alias, "pd", id->match_flags & PCMCIA_DEV_ID_MATCH_PROD_ID4, (unsigned)id->prod_id_hash[3]); return 1; } Index: linux-2.6.12/lib/gen_crc32table.c =================================================================== --- linux-2.6.12.orig/lib/gen_crc32table.c +++ linux-2.6.12/lib/gen_crc32table.c @@ -55,9 +55,9 @@ static void output_table(uint32_t table[ for (i = 0; i < len - 1; i++) { if (i % ENTRIES_PER_LINE == 0) printf("\n"); - printf("%s(0x%8.8xL), ", trans, table[i]); + printf("%s(0x%8.8xL), ", trans, (unsigned)table[i]); } - printf("%s(0x%8.8xL)\n", trans, table[len - 1]); + printf("%s(0x%8.8xL)\n", trans, (unsigned)table[len - 1]); } int main(int argc, char** argv) Index: linux-2.6.12/scripts/kconfig/Makefile =================================================================== --- linux-2.6.12.orig/scripts/kconfig/Makefile +++ linux-2.6.12/scripts/kconfig/Makefile @@ -108,6 +108,8 @@ clean-files := lkc_defs.h qconf.moc .tmp HOSTCFLAGS_lex.zconf.o := -I$(src) HOSTCFLAGS_zconf.tab.o := -I$(src) +HOSTLOADLIBES_conf = -lintl + HOSTLOADLIBES_qconf = -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(QTLIB) -ldl HOSTCXXFLAGS_qconf.o = -I$(QTDIR)/include -D LKC_DIRECT_LINK