aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-06-03 02:26:34 +0000
committerN.N. <matju@users.sourceforge.net>2009-06-03 02:26:34 +0000
commit52c72503a7594a838dfbc92d6be02435f2f2aebc (patch)
treea68d6e526f8c327e4ea994cb6814a662e98a4399
parent9bed1d12df95208e0b6cc94d0955361d7ae7a55c (diff)
fix post warnings
svn path=/trunk/; revision=11645
-rw-r--r--desiredata/src/d_soundfile.c7
-rw-r--r--desiredata/src/d_ugen.c16
2 files changed, 10 insertions, 13 deletions
diff --git a/desiredata/src/d_soundfile.c b/desiredata/src/d_soundfile.c
index 2f7755ae..9b1ac342 100644
--- a/desiredata/src/d_soundfile.c
+++ b/desiredata/src/d_soundfile.c
@@ -518,7 +518,7 @@ static void soundfile_finishwrite(void *obj, char *filename, int fd,
int filetype, long nframes, long itemswritten, int bytesperframe, int swap) {
if (itemswritten < nframes) {
if (nframes < 0x7fffffff)
- error("soundfiler_write: %d out of %d bytes written", itemswritten, nframes);
+ error("soundfiler_write: %ld out of %ld bytes written", itemswritten, nframes);
/* try to fix size fields in header */
if (filetype == FORMAT_WAVE) {
long datasize = itemswritten * bytesperframe, v;
@@ -1224,10 +1224,7 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s, int argc, t_atom *argv
if (poswas < 0 || eofis < 0) {error("lseek failed"); goto done;}
lseek(fd, poswas, SEEK_SET);
framesinfile = (eofis - poswas) / (p.nchannels * p.bytespersample);
- if (framesinfile > maxsize) {
- error("soundfiler_read: truncated to %d elements", maxsize);
- framesinfile = maxsize;
- }
+ if (framesinfile > maxsize) {error("soundfiler_read: truncated to %ld elements", maxsize); framesinfile = maxsize;}
framesinfile = min(framesinfile, p.bytelimit / (p.nchannels * p.bytespersample));
finalsize = framesinfile;
for (int i=0; i<argc; i++) {
diff --git a/desiredata/src/d_ugen.c b/desiredata/src/d_ugen.c
index 2692af7a..cccedbe7 100644
--- a/desiredata/src/d_ugen.c
+++ b/desiredata/src/d_ugen.c
@@ -303,7 +303,7 @@ extern "C" void signal_makereusable(t_signal *sig) {
for (t_signal *s5 = signal_freeborrowed; s5; s5 = s5->nextfree) {if (s5 == sig) {bug("signal_free 3"); return;}}
for (t_signal *s5 = signal_freelist[logn]; s5; s5 = s5->nextfree) {if (s5 == sig) {bug("signal_free 4"); return;}}
#endif
- if (ugen_loud) post("free %lx: %d", sig, sig->isborrowed);
+ if (ugen_loud) post("free %lx: %d", long(sig), sig->isborrowed);
if (sig->isborrowed) {
/* if the signal is borrowed, decrement the borrowed-from signal's reference count, possibly marking it reusable too */
t_signal *s2 = sig->borrowedfrom;
@@ -357,7 +357,7 @@ t_signal *signal_new(int n, float sr) {
ret->sr = sr;
ret->refcount = 0;
ret->borrowedfrom = 0;
- if (ugen_loud) post("new %lx: %d", ret, ret->isborrowed);
+ if (ugen_loud) post("new %lx: %d", long(ret), ret->isborrowed);
return ret;
}
@@ -586,10 +586,10 @@ static void ugen_doit(t_dspcontext *dc, t_ugenbox *u) {
if (!(*sig)->refcount) signal_makereusable(*sig);
}
if (ugen_loud) {
- if (u->nin+u->nout==0) post("put %s %d", class_getname(u->obj->ob_pd), ugen_index(dc,u));
- else if (u->nin+u->nout==1) post("put %s %d (%lx)", class_getname(u->obj->ob_pd), ugen_index(dc,u),sig[0]);
- else if (u->nin+u->nout==2) post("put %s %d (%lx %lx)", class_getname(u->obj->ob_pd), ugen_index(dc,u),sig[0],sig[1]);
- else post("put %s %d (%lx %lx %lx ...)", class_getname(u->obj->ob_pd), ugen_index(dc,u),sig[0],sig[1],sig[2]);
+ if (u->nin+u->nout==0) post("put %s %d", class_getname(u->obj->ob_pd),ugen_index(dc,u));
+ else if (u->nin+u->nout==1) post("put %s %d (%lx)", class_getname(u->obj->ob_pd),ugen_index(dc,u),long(sig[0]));
+ else if (u->nin+u->nout==2) post("put %s %d (%lx %lx)",class_getname(u->obj->ob_pd),ugen_index(dc,u),long(sig[0]),long(sig[1]));
+ else post("put %s %d (%lx %lx %lx ...)",class_getname(u->obj->ob_pd),ugen_index(dc,u),long(sig[0]),long(sig[1]),long(sig[2]));
}
/* pass it on and trip anyone whose last inlet was filled */
for (uout = u->out, i = u->nout; i--; uout++) {
@@ -703,7 +703,7 @@ extern "C" void ugen_done_graph(t_dspcontext *dc) {
if ((*sigp)->isborrowed && !(*sigp)->borrowedfrom) {
signal_setborrowed(*sigp, signal_new(parent_vecsize, parent_srate));
(*sigp)->refcount++;
- if (ugen_loud) post("set %lx->%lx", *sigp, (*sigp)->borrowedfrom);
+ if (ugen_loud) post("set %lx->%lx", long(*sigp), long((*sigp)->borrowedfrom));
}
}
}
@@ -754,7 +754,7 @@ extern "C" void ugen_done_graph(t_dspcontext *dc) {
signal_setborrowed(*sigp, s3);
(*sigp)->refcount++;
dsp_add_zero(s3->v, s3->n);
- if (ugen_loud) post("oops, belatedly set %lx->%lx", *sigp, (*sigp)->borrowedfrom);
+ if (ugen_loud) post("oops, belatedly set %lx->%lx", long(*sigp), long((*sigp)->borrowedfrom));
}
}
break; /* don't need to keep looking. */