summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-30 02:59:34 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-30 02:59:34 -0200
commit16b11cd03d8c5def07f0e598f237f71a37883a46 (patch)
tree98b4eb096e87571a0c8de78e6129719626a22584
parentfb22d4d928bc5d1a893494a059359da2ed2ac639 (diff)
Correct static symbol XkmReadTOC and first pass on compile warning fixes.
The warnings corrected were only the ones that should correct real problems. The most common one is 64 bit integers as "printf %l" arguments. Note that there is a patch related to this at: http://bugs.freedesktop.org/show_bug.cgi?id=18204
-rw-r--r--hw/xfree86/common/xf86Bus.c22
-rw-r--r--hw/xfree86/common/xf86pciBus.c6
-rw-r--r--hw/xfree86/os-support/linux/int10/linux.c3
-rw-r--r--include/xkbfile.h11
-rw-r--r--xkb/xkmread.c2
5 files changed, 19 insertions, 25 deletions
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 214609e53..c825d236f 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -1005,7 +1005,7 @@ needCheck(resPtr pRes, unsigned long type, int entityIndex, xf86State state)
1005 if (pRes->entityIndex > -1) 1005 if (pRes->entityIndex > -1)
1006 r_loc = xf86Entities[pRes->entityIndex]->busType; 1006 r_loc = xf86Entities[pRes->entityIndex]->busType;
1007 1007
1008 if ((type & ResAccMask == ResShared) && 1008 if ((type & ResAccMask) == ResShared &&
1009 (pRes->res_type & ResAccMask) == ResShared) 1009 (pRes->res_type & ResAccMask) == ResShared)
1010 return FALSE; 1010 return FALSE;
1011 1011
@@ -1038,7 +1038,7 @@ checkConflict(resRange *rgp, resPtr pRes, int entityIndex,
1038 case ResBlock: 1038 case ResBlock:
1039 if (rgp->rEnd < rgp->rBegin) { 1039 if (rgp->rEnd < rgp->rBegin) {
1040 xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", 1040 xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n",
1041 rgp->rEnd,rgp->rBegin); 1041 (long)rgp->rEnd, (long)rgp->rBegin);
1042 return 0; 1042 return 0;
1043 } 1043 }
1044 if ((ret = checkConflictBlock(rgp, pRes))) { 1044 if ((ret = checkConflictBlock(rgp, pRes))) {
@@ -1051,7 +1051,7 @@ checkConflict(resRange *rgp, resPtr pRes, int entityIndex,
1051 if ((rgp->rBase & rgp->rMask) != rgp->rBase) { 1051 if ((rgp->rBase & rgp->rMask) != rgp->rBase) {
1052 xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" 1052 xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)"
1053 "doesn't satisfy (base & mask = mask)\n", 1053 "doesn't satisfy (base & mask = mask)\n",
1054 rgp->rBase, rgp->rMask); 1054 (long)rgp->rBase, (long)rgp->rMask);
1055 return 0; 1055 return 0;
1056 } 1056 }
1057 if ((ret = checkConflictSparse(rgp, pRes))) { 1057 if ((ret = checkConflictSparse(rgp, pRes))) {
@@ -1107,7 +1107,7 @@ xf86AddResToList(resPtr rlist, resRange *range, int entityIndex)
1107 case ResBlock: 1107 case ResBlock:
1108 if (range->rEnd < range->rBegin) { 1108 if (range->rEnd < range->rBegin) {
1109 xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", 1109 xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n",
1110 range->rEnd,range->rBegin); 1110 (long)range->rEnd, (long)range->rBegin);
1111 return rlist; 1111 return rlist;
1112 } 1112 }
1113 break; 1113 break;
@@ -1115,7 +1115,7 @@ xf86AddResToList(resPtr rlist, resRange *range, int entityIndex)
1115 if ((range->rBase & range->rMask) != range->rBase) { 1115 if ((range->rBase & range->rMask) != range->rBase) {
1116 xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" 1116 xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)"
1117 "doesn't satisfy (base & mask = mask)\n", 1117 "doesn't satisfy (base & mask = mask)\n",
1118 range->rBase, range->rMask); 1118 (long)range->rBase, (long)range->rMask);
1119 return rlist; 1119 return rlist;
1120 } 1120 }
1121 break; 1121 break;
@@ -1190,14 +1190,17 @@ xf86PrintResList(int verb, resPtr list)
1190 "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx (0x%lx)", 1190 "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx (0x%lx)",
1191 i, list->entityIndex, 1191 i, list->entityIndex,
1192 (list->res_type & ResDomain) >> 24, 1192 (list->res_type & ResDomain) >> 24,
1193 list->block_begin, list->block_end, 1193 (long)list->block_begin,
1194 list->block_end - list->block_begin + 1); 1194 (long)list->block_end,
1195 (long)(list->block_end -
1196 list->block_begin + 1));
1195 break; 1197 break;
1196 case ResSparse: 1198 case ResSparse:
1197 xf86ErrorFVerb(verb, "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx ", 1199 xf86ErrorFVerb(verb, "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx ",
1198 i, list->entityIndex, 1200 i, list->entityIndex,
1199 (list->res_type & ResDomain) >> 24, 1201 (list->res_type & ResDomain) >> 24,
1200 list->sparse_base,list->sparse_mask); 1202 (long)list->sparse_base,
1203 (long)list->sparse_mask);
1201 break; 1204 break;
1202 default: 1205 default:
1203 list = list->next; 1206 list = list->next;
@@ -1856,7 +1859,8 @@ xf86PostProbe(void)
1856 resp = resp->next; 1859 resp = resp->next;
1857 resp_x->next = tmp; 1860 resp_x->next = tmp;
1858 } else { 1861 } else {
1859 xf86MsgVerb(X_INFO, 3, "Found conflict at: 0x%lx\n",val); 1862 xf86MsgVerb(X_INFO, 3, "Found conflict at: 0x%lx\n",
1863 (long)val);
1860 resp->res_type &= ~ResEstimated; 1864 resp->res_type &= ~ResEstimated;
1861 tmp = xf86Entities[i]->resources; 1865 tmp = xf86Entities[i]->resources;
1862 xf86Entities[i]->resources = resp; 1866 xf86Entities[i]->resources = resp;
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index df8d8a58f..ba2f8f73d 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -441,7 +441,7 @@ xf86PciProbe(void)
441 memdone = TRUE; 441 memdone = TRUE;
442 } else 442 } else
443 xf86ErrorF(", "); 443 xf86ErrorF(", ");
444 xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); 444 xf86ErrorF("0x%08lx/%ld", (long)r->base_addr, (long)r->size);
445 } 445 }
446 } 446 }
447 447
@@ -454,12 +454,12 @@ xf86PciProbe(void)
454 iodone = TRUE; 454 iodone = TRUE;
455 } else 455 } else
456 xf86ErrorF(", "); 456 xf86ErrorF(", ");
457 xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); 457 xf86ErrorF("0x%08lx/%ld", (long)r->base_addr, (long)r->size);
458 } 458 }
459 } 459 }
460 460
461 if ( info->rom_size ) { 461 if ( info->rom_size ) {
462 xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", info->rom_size); 462 xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", (long)info->rom_size);
463 } 463 }
464 464
465 xf86ErrorF("\n"); 465 xf86ErrorF("\n");
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index 6ccd466f6..45ddaa894 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -252,7 +252,8 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
252 for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) 252 for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE)
253 if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE) 253 if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE)
254 xf86DrvMsg(screen, X_WARNING, 254 xf86DrvMsg(screen, X_WARNING,
255 "Unable to retrieve all of segment 0x%06lX.\n", cs); 255 "Unable to retrieve all of segment 0x%06lX.\n",
256 (long)cs);
256#ifdef DEBUG 257#ifdef DEBUG
257 ErrorF("done\n"); 258 ErrorF("done\n");
258#endif 259#endif
diff --git a/include/xkbfile.h b/include/xkbfile.h
index c84f21dd4..d12aad557 100644
--- a/include/xkbfile.h
+++ b/include/xkbfile.h
@@ -307,17 +307,6 @@ extern unsigned XkmReadFile(
307 XkbDescPtr * /* result */ 307 XkbDescPtr * /* result */
308); 308);
309 309
310#ifdef _XKMFORMAT_H_
311
312extern Bool XkmReadTOC(
313 FILE * /* file */,
314 xkmFileInfo * /* file_info */,
315 int /* max_toc */,
316 xkmSectionInfo * /* toc */
317);
318
319#endif /* _XKMFORMAT_H */
320
321_XFUNCPROTOEND 310_XFUNCPROTOEND
322 311
323#endif /* _XKBFILE_H_ */ 312#endif /* _XKBFILE_H_ */
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index f9b4025da..b7bb20965 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -1043,7 +1043,7 @@ int nRead=0;
1043 return 1; 1043 return 1;
1044} 1044}
1045 1045
1046_X_EXPORT static Bool 1046static Bool
1047XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc) 1047XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc)
1048{ 1048{
1049unsigned hdr,tmp; 1049unsigned hdr,tmp;