summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/stream.c1
-rw-r--r--runtime/stream.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/runtime/stream.c b/runtime/stream.c
index 605a9771..a6ed70fe 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -833,6 +833,7 @@ finalize_it:
* the very some producer comes back in sequence to submit the then-filled buffers.
* This also enables us to timout on partially written buffers. -- rgerhards, 2009-07-06
*/
+//#include <stdio.h>
static inline rsRetVal
doAsyncWriteInternal(strm_t *pThis, size_t lenBuf)
{
diff --git a/runtime/stream.h b/runtime/stream.h
index cb368835..64ffb6e1 100644
--- a/runtime/stream.h
+++ b/runtime/stream.h
@@ -131,8 +131,8 @@ typedef struct strm_s {
pthread_cond_t notFull;
pthread_cond_t notEmpty;
pthread_cond_t isEmpty;
- short iEnq;
- short iDeq;
+ unsigned short iEnq; /* this MUST be unsigned as we use module arithmetic (else invalid indexing happens!) */
+ unsigned short iDeq; /* this MUST be unsigned as we use module arithmetic (else invalid indexing happens!) */
short iCnt; /* current nbr of elements in buffer */
struct {
uchar *pBuf;