Skip to content
This repository
Browse code

Fix for warning about comparison of signed and unsigned int.

  • Loading branch information...
commit 899e03e7d16cf936b3a15dd571217d01406bb5d2 1 parent 625911f
Nicholas Humfrey authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  NanodeUNIO.cpp
4  NanodeUNIO.cpp
@@ -125,7 +125,7 @@ static boolean read_byte(byte *b, boolean mak) {
125 125
 /* Send data on the bus. If end is true, send NoMAK after the last
126 126
    byte; otherwise send MAK. */
127 127
 static boolean unio_send(const byte *data,word length,boolean end) {
128  
-  for (int i=0; i<length; i++) {
  128
+  for (word i=0; i<length; i++) {
129 129
     /* Rules for sending MAK: if it's the last byte and end is true,
130 130
        send NoMAK.  Otherwise send MAK. */
131 131
     if (!send_byte(data[i],!(((i+1)==length) && end))) return false;
@@ -136,7 +136,7 @@ static boolean unio_send(const byte *data,word length,boolean end) {
136 136
 /* Read data from the bus.  After reading 'length' bytes, send NoMAK to
137 137
    terminate the command. */
138 138
 static boolean unio_read(byte *data,word length)  {
139  
-  for (int i=0; i<length; i++) {
  139
+  for (word i=0; i<length; i++) {
140 140
     if (!read_byte(data+i,!((i+1)==length))) return false;
141 141
   }
142 142
   return true;

0 notes on commit 899e03e

Please sign in to comment.
Something went wrong with that request. Please try again.