format string warnings, courtesy of Interix 3.5
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.33 2006/11/10 07:52:02 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.34 2006/11/12 12:49:25 tg Exp $");
|
||||||
|
|
||||||
#ifndef mksh_siglist
|
#ifndef mksh_siglist
|
||||||
#if defined(BSD) || defined(__APPLE__)
|
#if defined(BSD) || defined(__APPLE__)
|
||||||
@@ -763,7 +763,7 @@ hist_shrink(unsigned char *oldbase, int oldbytes)
|
|||||||
/*
|
/*
|
||||||
* create temp file
|
* create temp file
|
||||||
*/
|
*/
|
||||||
(void) shf_snprintf(nfile, sizeof(nfile), "%s.%d", hname, procpid);
|
shf_snprintf(nfile, sizeof(nfile), "%s.%d", hname, (int)procpid);
|
||||||
if ((fd = open(nfile, O_CREAT | O_TRUNC | O_WRONLY, 0600)) < 0)
|
if ((fd = open(nfile, O_CREAT | O_TRUNC | O_WRONLY, 0600)) < 0)
|
||||||
return 1;
|
return 1;
|
||||||
if (fstat(histfd, &statb) >= 0)
|
if (fstat(histfd, &statb) >= 0)
|
||||||
|
13
jobs.c
13
jobs.c
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.14 2006/11/10 07:52:03 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.15 2006/11/12 12:49:25 tg Exp $");
|
||||||
|
|
||||||
/* Order important! */
|
/* Order important! */
|
||||||
#define PRUNNING 0
|
#define PRUNNING 0
|
||||||
@@ -1202,8 +1202,8 @@ j_print(Job *j, int how, struct shf *shf)
|
|||||||
* group leader (ie, !FMONITOR). We arbitrarily return
|
* group leader (ie, !FMONITOR). We arbitrarily return
|
||||||
* last pid (which is what $! returns).
|
* last pid (which is what $! returns).
|
||||||
*/
|
*/
|
||||||
shf_fprintf(shf, "%d\n", j->pgrp ? j->pgrp :
|
shf_fprintf(shf, "%d\n", (int)(j->pgrp ? j->pgrp :
|
||||||
(j->last_proc ? j->last_proc->pid : 0));
|
(j->last_proc ? j->last_proc->pid : 0)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
j->flags &= ~JF_CHANGED;
|
j->flags &= ~JF_CHANGED;
|
||||||
@@ -1258,7 +1258,7 @@ j_print(Job *j, int how, struct shf *shf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (how == JP_LONG)
|
if (how == JP_LONG)
|
||||||
shf_fprintf(shf, "%5d ", p->pid);
|
shf_fprintf(shf, "%5d ", (int)p->pid);
|
||||||
|
|
||||||
if (how == JP_SHORT) {
|
if (how == JP_SHORT) {
|
||||||
if (buf[0]) {
|
if (buf[0]) {
|
||||||
@@ -1278,8 +1278,9 @@ j_print(Job *j, int how, struct shf *shf)
|
|||||||
p = p->next;
|
p = p->next;
|
||||||
while (p && p->state == state && p->status == status) {
|
while (p && p->state == state && p->status == status) {
|
||||||
if (how == JP_LONG)
|
if (how == JP_LONG)
|
||||||
shf_fprintf(shf, "%s%5d %-20s %s%s", filler, p->pid,
|
shf_fprintf(shf, "%s%5d %-20s %s%s", filler,
|
||||||
space, p->command, p->next ? "|" : null);
|
(int)p->pid, space, p->command,
|
||||||
|
p->next ? "|" : null);
|
||||||
else if (how == JP_MEDIUM)
|
else if (how == JP_MEDIUM)
|
||||||
shf_fprintf(shf, " %s%s", p->command,
|
shf_fprintf(shf, " %s%s", p->command,
|
||||||
p->next ? "|" : null);
|
p->next ? "|" : null);
|
||||||
|
Reference in New Issue
Block a user