static Bool noDefaultPath = False;
/* number of entries allocated for includePath */
-static int szPath;
+static size_t szPath;
/* number of actual entries in includePath */
-static int nPathEntries;
+static size_t nPathEntries;
/* Holds all directories we might be including data from */
static char **includePath = NULL;
static void
XkbClearIncludePath(void)
{
- int i;
+ size_t i;
if (szPath > 0)
{
includePath[nPathEntries] = strdup(dir);
if (includePath[nPathEntries] == NULL)
{
- WSGO("Allocation failed (includePath[%d])\n", nPathEntries);
+ WSGO("Allocation failed (includePath[%zd])\n", nPathEntries);
return False;
}
nPathEntries++;
FILE *
XkbFindFileInPath(const char *name, unsigned type, char **pathRtrn)
{
- int i, ret;
+ size_t i;
+ int ret;
FILE *file = NULL;
char buf[PATH_MAX];
const char *typeDir;
ret = snprintf(buf, sizeof(buf), "%s/%s/%s",
includePath[i], typeDir, name);
- if (ret >= sizeof(buf))
+ if (ret >= (ssize_t)sizeof(buf))
{
ERROR("File name (%s/%s/%s) too long\n", includePath[i],
typeDir, name);