summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-30 02:59:34 -0200
committerKeith Packard <keithp@keithp.com>2009-02-17 15:49:06 -0800
commit8c6ddbf754ff6c2eb99105f93aaa30749dced619 (patch)
tree792dc735201aae3abfe3a78aa05e20976f32e734 /hw
parent0c9db0ea10d9fd2a311bca47bba3c60e74ec6eec (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 Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 16b11cd03d8c5def07f0e598f237f71a37883a46)
Diffstat (limited to 'hw')
-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
3 files changed, 18 insertions, 13 deletions
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 3236b5a4f..b94d500f0 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 b6ec4adbb..467a0c397 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 06f42f8af..8274bbbfb 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