Skip to content

Commit 1503630

Browse files
committed
Avoid compiler warnings
1 parent 26e06a9 commit 1503630

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/SARA-R5_Example15_GNSS_NTRIP_Caster_With_Callbacks/SARA-R5_NTRIP_Client.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ bool beginClient(int *theSocket, bool *connectionIsOpen)
9898
}
9999

100100
// Add the encoded credentials to the server request
101-
strncat(serverRequest, credentials, SERVER_BUFFER_SIZE);
102-
strncat(serverRequest, "\r\n", SERVER_BUFFER_SIZE);
101+
strncat(serverRequest, credentials, SERVER_BUFFER_SIZE - 1);
102+
strncat(serverRequest, "\r\n", SERVER_BUFFER_SIZE - 1);
103103

104104
Serial.print(F("beginClient: serverRequest size: "));
105105
Serial.print(strlen(serverRequest));
@@ -134,8 +134,8 @@ bool beginClient(int *theSocket, bool *connectionIsOpen)
134134

135135
//Check reply
136136
int connectionResult = 0;
137-
char response[512];
138-
memset(response, 0, 512);
137+
char response[512 * 4];
138+
memset(response, 0, 512 * 4);
139139
size_t responseSpot = 0;
140140
while ((availableLength > 0) && (connectionResult == 0)) // Read bytes from the caster and store them
141141
{

0 commit comments

Comments
 (0)