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
parent fb22d4d9
......@@ -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;
......
......@@ -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");
......
......@@ -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
......
......@@ -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_ */
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment