Skip to content

Commit

Permalink
Fix some warnings in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
PaintYourDragon committed Oct 25, 2022
1 parent a3ff399 commit 7bd8dd8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions Adafruit_FONA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,6 @@ bool Adafruit_FONA::getGPS(float *lat, float *lon, float *speed_kph,
// Parse 3G respose
// +CGPSINFO:4043.000000,N,07400.000000,W,151015,203802.1,-12.0,0.0,0
// skip beginning
char *tok;

// grab the latitude
char *latp = strtok(gpsbuffer, ",");
Expand All @@ -1287,8 +1286,8 @@ bool Adafruit_FONA::getGPS(float *lat, float *lon, float *speed_kph,
return false;

// skip date & time
tok = strtok(NULL, ",");
tok = strtok(NULL, ",");
(void)strtok(NULL, ",");
(void)strtok(NULL, ",");

// only grab altitude if needed
if (altitude != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion examples/FONA_SMS_Response/FONA_SMS_Response.ino
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void loop() {

//Send back an automatic response
Serial.println("Sending reponse...");
if (!fona.sendSMS(callerIDbuffer, "Hey, I got your text!")) {
if (!fona.sendSMS(callerIDbuffer, (char *)"Hey, I got your text!")) {
Serial.println(F("Failed"));
} else {
Serial.println(F("Sent!"));
Expand Down
3 changes: 2 additions & 1 deletion examples/FONAtest/FONAtest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ void loop() {
}
case 'M': {
// Get FM volume.
uint8_t fmvol = fona.getFMVolume();
int8_t fmvol = fona.getFMVolume();
if (fmvol < 0) {
Serial.println(F("Failed"));
} else {
Expand Down Expand Up @@ -610,6 +610,7 @@ void loop() {
Serial.println(replybuffer);
Serial.println(F("*****"));
}
break;
}

/*** Time ***/
Expand Down
3 changes: 2 additions & 1 deletion examples/FONAtest_KEY_mod/FONAtest_KEY_mod.ino
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void loop() {
}
case 'M': {
// Get FM volume.
uint8_t fmvol = fona.getFMVolume();
int8_t fmvol = fona.getFMVolume();
if (fmvol < 0) {
Serial.println(F("Failed"));
} else {
Expand Down Expand Up @@ -633,6 +633,7 @@ void loop() {
Serial.println(replybuffer);
Serial.println(F("*****"));
}
break;
}

/*** Time ***/
Expand Down

0 comments on commit 7bd8dd8

Please sign in to comment.