Fix Clang static analyzer warnings
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
0d5a8bf461
commit
1c77aad39c
22 changed files with 154 additions and 37 deletions
|
@ -15,6 +15,7 @@
|
|||
#include "dds/ddsrt/misc.h"
|
||||
#include "mock_authentication.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
@ -72,6 +73,11 @@ DDS_Security_ValidationResult_t validate_local_identity(
|
|||
}
|
||||
}
|
||||
|
||||
/* for Clang's static analyzer */
|
||||
assert(identity_certificate != NULL);
|
||||
assert(identity_ca != NULL);
|
||||
assert(private_key != NULL);
|
||||
|
||||
if( strcmp(identity_certificate, test_identity_certificate) != 0){
|
||||
|
||||
result = DDS_SECURITY_VALIDATION_FAILED;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "dds/ddsrt/misc.h"
|
||||
#include "mock_authentication.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
@ -73,6 +74,11 @@ DDS_Security_ValidationResult_t validate_local_identity(
|
|||
}
|
||||
}
|
||||
|
||||
/* for Clang's static analyzer */
|
||||
assert(identity_certificate != NULL);
|
||||
assert(identity_ca != NULL);
|
||||
assert(private_key != NULL);
|
||||
|
||||
if( strcmp(identity_certificate, test_identity_certificate) != 0){
|
||||
|
||||
result = DDS_SECURITY_VALIDATION_FAILED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue