Skip to content

Commit 20a4d97

Browse files
authored
Merge pull request Arduino-IRremote#519 from PaulStoffregen/master
Fix minor compiler warnings in examples
2 parents 47aadf5 + 1154607 commit 20a4d97

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/IRrecord/IRrecord.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ int toggle = 0; // The RC5/6 toggle state
4545
// Most of this code is just logging
4646
void storeCode(decode_results *results) {
4747
codeType = results->decode_type;
48-
int count = results->rawlen;
48+
//int count = results->rawlen;
4949
if (codeType == UNKNOWN) {
5050
Serial.println("Received unknown code, saving as raw");
5151
codeLen = results->rawlen - 1;

examples/IRtest2/IRtest2.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void setup()
6161
// Wait for the gap between tests, to synchronize with
6262
// the sender.
6363
// Specifically, wait for a signal followed by a gap of at last gap ms.
64-
void waitForGap(int gap) {
64+
void waitForGap(unsigned long gap) {
6565
Serial.println("Waiting for gap");
6666
while (1) {
6767
while (digitalRead(RECV_PIN) == LOW) {
@@ -125,7 +125,7 @@ void dump(decode_results *results) {
125125
// The motivation behind this method is that the sender and the receiver
126126
// can do the same test calls, and the mode variable indicates whether
127127
// to send or receive.
128-
void test(char *label, int type, unsigned long value, int bits) {
128+
void test(const char *label, int type, unsigned long value, int bits) {
129129
if (mode == SENDER) {
130130
Serial.println(label);
131131
if (type == NEC) {
@@ -175,7 +175,7 @@ void test(char *label, int type, unsigned long value, int bits) {
175175

176176
// Test raw send or receive. This is similar to the test method,
177177
// except it send/receives raw data.
178-
void testRaw(char *label, unsigned int *rawbuf, int rawlen) {
178+
void testRaw(const char *label, unsigned int *rawbuf, int rawlen) {
179179
if (mode == SENDER) {
180180
Serial.println(label);
181181
irsend.sendRaw(rawbuf, rawlen, 38 /* kHz */);

examples/LGACSendDemo/LGACSendDemo.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,12 @@ void loop()
192192
ac_activate(AC_TEMPERATURE, AC_FLOW);
193193
break;
194194
case 2:
195-
if ( b == 0 | b == 1 ) {
195+
if ( b == 0 || b == 1 ) {
196196
ac_change_air_swing(b);
197197
}
198198
break;
199199
case 3: // 1 : clean on, power on
200-
if ( b == 0 | b == 1 ) {
200+
if ( b == 0 || b == 1 ) {
201201
ac_air_clean(b);
202202
}
203203
break;

0 commit comments

Comments
 (0)