Skip to content

Commit c5d4e5f

Browse files
per1234cmaglie
authored andcommitted
Fix comparison between signed and unsigned warning in StringLength example
Fixes: warning: comparison between signed and unsigned integer expressions compiler warning. Closes #693 (in conjunction with #6448)
1 parent 352df2c commit c5d4e5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/shared/examples/08.Strings/StringLength/StringLength.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414

1515
String txtMsg = ""; // a string for incoming text
16-
int lastStringLength = txtMsg.length(); // previous length of the String
16+
unsigned int lastStringLength = txtMsg.length(); // previous length of the String
1717

1818
void setup() {
1919
// Open serial communications and wait for port to open:

0 commit comments

Comments
 (0)