| author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-30 04:59:34 (GMT) |
|---|---|---|
| committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-30 04:59:34 (GMT) |
| commit | 16b11cd03d8c5def07f0e598f237f71a37883a46 (patch) (side-by-side diff) | |
| tree | 98b4eb096e87571a0c8de78e6129719626a22584 | |
| parent | fb22d4d928bc5d1a893494a059359da2ed2ac639 (diff) | |
| download | xserver-16b11cd03d8c5def07f0e598f237f71a37883a46.zip xserver-16b11cd03d8c5def07f0e598f237f71a37883a46.tar.gz | |
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.c | 22 | ||||
| -rw-r--r-- | hw/xfree86/common/xf86pciBus.c | 6 | ||||
| -rw-r--r-- | hw/xfree86/os-support/linux/int10/linux.c | 3 | ||||
| -rw-r--r-- | include/xkbfile.h | 11 | ||||
| -rw-r--r-- | xkb/xkmread.c | 2 |
5 files changed, 19 insertions, 25 deletions
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 214609e..c825d23 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) if (pRes->entityIndex > -1) r_loc = xf86Entities[pRes->entityIndex]->busType; - if ((type & ResAccMask == ResShared) && + if ((type & ResAccMask) == ResShared && (pRes->res_type & ResAccMask) == ResShared) return FALSE; @@ -1038,7 +1038,7 @@ checkConflict(resRange *rgp, resPtr pRes, int entityIndex, case ResBlock: if (rgp->rEnd < rgp->rBegin) { xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", - rgp->rEnd,rgp->rBegin); + (long)rgp->rEnd, (long)rgp->rBegin); return 0; } if ((ret = checkConflictBlock(rgp, pRes))) { @@ -1051,7 +1051,7 @@ checkConflict(resRange *rgp, resPtr pRes, int entityIndex, if ((rgp->rBase & rgp->rMask) != rgp->rBase) { xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" "doesn't satisfy (base & mask = mask)\n", - rgp->rBase, rgp->rMask); + (long)rgp->rBase, (long)rgp->rMask); return 0; } if ((ret = checkConflictSparse(rgp, pRes))) { @@ -1107,7 +1107,7 @@ xf86AddResToList(resPtr rlist, resRange *range, int entityIndex) case ResBlock: if (range->rEnd < range->rBegin) { xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", - range->rEnd,range->rBegin); + (long)range->rEnd, (long)range->rBegin); return rlist; } break; @@ -1115,7 +1115,7 @@ xf86AddResToList(resPtr rlist, resRange *range, int entityIndex) if ((range->rBase & range->rMask) != range->rBase) { xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" "doesn't satisfy (base & mask = mask)\n", - range->rBase, range->rMask); + (long)range->rBase, (long)range->rMask); return rlist; } break; @@ -1190,14 +1190,17 @@ xf86PrintResList(int verb, resPtr list) "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx (0x%lx)", i, list->entityIndex, (list->res_type & ResDomain) >> 24, - list->block_begin, list->block_end, - list->block_end - list->block_begin + 1); + (long)list->block_begin, + (long)list->block_end, + (long)(list->block_end - + list->block_begin + 1)); break; case ResSparse: xf86ErrorFVerb(verb, "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx ", i, list->entityIndex, (list->res_type & ResDomain) >> 24, - list->sparse_base,list->sparse_mask); + (long)list->sparse_base, + (long)list->sparse_mask); break; default: list = list->next; @@ -1856,7 +1859,8 @@ xf86PostProbe(void) resp = resp->next; resp_x->next = tmp; } else { - xf86MsgVerb(X_INFO, 3, "Found conflict at: 0x%lx\n",val); + xf86MsgVerb(X_INFO, 3, "Found conflict at: 0x%lx\n", + (long)val); resp->res_type &= ~ResEstimated; tmp = xf86Entities[i]->resources; xf86Entities[i]->resources = resp; diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index df8d8a5..ba2f8f7 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -441,7 +441,7 @@ xf86PciProbe(void) memdone = TRUE; } else xf86ErrorF(", "); - xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); + xf86ErrorF("0x%08lx/%ld", (long)r->base_addr, (long)r->size); } } @@ -454,12 +454,12 @@ xf86PciProbe(void) iodone = TRUE; } else xf86ErrorF(", "); - xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); + xf86ErrorF("0x%08lx/%ld", (long)r->base_addr, (long)r->size); } } if ( info->rom_size ) { - xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", info->rom_size); + xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", (long)info->rom_size); } xf86ErrorF("\n"); diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c index 6ccd466..45ddaa8 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) for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE) xf86DrvMsg(screen, X_WARNING, - "Unable to retrieve all of segment 0x%06lX.\n", cs); + "Unable to retrieve all of segment 0x%06lX.\n", + (long)cs); #ifdef DEBUG ErrorF("done\n"); #endif diff --git a/include/xkbfile.h b/include/xkbfile.h index c84f21d..d12aad5 100644 --- a/include/xkbfile.h +++ b/include/xkbfile.h @@ -307,17 +307,6 @@ extern unsigned XkmReadFile( XkbDescPtr * /* result */ ); -#ifdef _XKMFORMAT_H_ - -extern Bool XkmReadTOC( - FILE * /* file */, - xkmFileInfo * /* file_info */, - int /* max_toc */, - xkmSectionInfo * /* toc */ -); - -#endif /* _XKMFORMAT_H */ - _XFUNCPROTOEND #endif /* _XKBFILE_H_ */ diff --git a/xkb/xkmread.c b/xkb/xkmread.c index f9b4025..b7bb209 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -1043,7 +1043,7 @@ int nRead=0; return 1; } -_X_EXPORT static Bool +static Bool XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc) { unsigned hdr,tmp; |
