Require compiler warnings. (#418)

This commit is contained in:
Jonathan Hui
2016-08-18 12:22:12 -07:00
committed by GitHub
parent c26fec1692
commit 9b6afb31c0
6 changed files with 17 additions and 24 deletions
+3 -4
View File
@@ -143,7 +143,7 @@ void TestDiag()
// initialize platform layer
int argc = 2;
char *argv[2] = {(char *)"test_diag", (char *)"1"};
char *argv[8] = {(char *)"test_diag", (char *)"1"};
PlatformInit(argc, argv);
// initialize diagnostics module
@@ -156,12 +156,11 @@ void TestDiag()
{
char string[50];
int length = strlen(tests[i].command);
char *cmd;
char *argv[8];
int argc = 0;
char *output = NULL;
argc = 0;
memcpy(string, tests[i].command, length + 1);
for (cmd = string + 1; (cmd < string + length) && (cmd != NULL); ++cmd)
+4 -4
View File
@@ -145,12 +145,12 @@ void TestLowpanIphc(void)
"6lo: Lowpan::Decompress failed");
// ===> Test Lowpan::Compress
int resultLength = sMockLowpan.Compress(*message, macSource, macDest,
result);
int compressBytes = sMockLowpan.Compress(*message, macSource, macDest,
result);
printf("Compressed OpenThread:\n");
otTestPrintHex(result, resultLength);
otTestPrintHex(result, compressBytes);
VerifyOrQuit(memcmp(frame.GetPayload(), result, resultLength) == 0,
VerifyOrQuit(memcmp(frame.GetPayload(), result, compressBytes) == 0,
"6lo: Lowpan::Compress failed");
SuccessOrQuit(Message::Free(*message), "6lo: Message:Free failed");