mirror of https://github.com/FDOS/kernel.git
Fixed warning fixes for printf - did it the wrong way before.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@328 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
fe51b7a036
commit
684a2cb93d
24
kernel/prf.c
24
kernel/prf.c
|
@ -281,16 +281,15 @@ COUNT
|
||||||
UWORD w[2];
|
UWORD w[2];
|
||||||
static char pointerFormat[] = "%04x:%04x";
|
static char pointerFormat[] = "%04x:%04x";
|
||||||
w[1] = *((UWORD *) arg);
|
w[1] = *((UWORD *) arg);
|
||||||
arg += sizeof(UWORD);
|
arg += sizeof(UWORD)/sizeof(BYTE *);
|
||||||
w[0] = *((UWORD *) arg);
|
w[0] = *((UWORD *) arg);
|
||||||
arg += sizeof(UWORD);
|
arg += sizeof(UWORD)/sizeof(BYTE *);
|
||||||
do_printf(pointerFormat,(BYTE**)&w);
|
do_printf(pointerFormat,(BYTE**)&w);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
p = *((BYTE **) arg);
|
p = *arg++;
|
||||||
arg += sizeof(BYTE *);
|
|
||||||
goto do_outputstring;
|
goto do_outputstring;
|
||||||
|
|
||||||
case 'F':
|
case 'F':
|
||||||
|
@ -298,7 +297,7 @@ COUNT
|
||||||
/* we assume %Fs here */
|
/* we assume %Fs here */
|
||||||
case 'S':
|
case 'S':
|
||||||
p = *((BYTE FAR **) arg);
|
p = *((BYTE FAR **) arg);
|
||||||
arg += sizeof(BYTE FAR *);
|
arg += sizeof(BYTE FAR *)/sizeof(BYTE *);
|
||||||
goto do_outputstring;
|
goto do_outputstring;
|
||||||
|
|
||||||
case 'i':
|
case 'i':
|
||||||
|
@ -322,13 +321,20 @@ COUNT
|
||||||
if (longarg)
|
if (longarg)
|
||||||
{
|
{
|
||||||
currentArg = *((LONG *) arg);
|
currentArg = *((LONG *) arg);
|
||||||
arg += sizeof(LONG);
|
arg += sizeof(LONG)/sizeof(BYTE *);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (base < 0) currentArg = *((int*) arg);
|
if (base < 0)
|
||||||
else currentArg = *((unsigned int*) arg);
|
{
|
||||||
arg += sizeof(int);
|
currentArg = *((int*) arg);
|
||||||
|
arg += sizeof(int)/sizeof(BYTE *);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentArg = *((unsigned int*) arg);
|
||||||
|
arg += sizeof(unsigned int)/sizeof(BYTE *);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ltob(currentArg, s, base);
|
ltob(currentArg, s, base);
|
||||||
|
|
|
@ -154,7 +154,7 @@ COUNT ChildEnv(exec_blk FAR * exp, UWORD * pChildEnvSeg, char far * pathname)
|
||||||
|
|
||||||
/* initialize 'extra strings' count */
|
/* initialize 'extra strings' count */
|
||||||
*((UWORD FAR *) pDest) = 1;
|
*((UWORD FAR *) pDest) = 1;
|
||||||
pDest += sizeof(UWORD);
|
pDest += sizeof(UWORD)/sizeof(BYTE);
|
||||||
|
|
||||||
/* copy complete pathname */
|
/* copy complete pathname */
|
||||||
if ((RetCode = truename(pathname, pDest, TRUE)) != SUCCESS) {
|
if ((RetCode = truename(pathname, pDest, TRUE)) != SUCCESS) {
|
||||||
|
|
Loading…
Reference in New Issue