Skip to content

Commit 0552214

Browse files
committed
Remove config include from header
core_mqtt_serializer.h included the user coreMQTT config, which spills the config header's contents into all consumers of coreMQTT's headers. Macros from the config are no longer used in the the API, so this is also no longer used for anything, so can be removed.
1 parent e122ce1 commit 0552214

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

source/include/core_mqtt_serializer.h

-12
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,6 @@
4242
#endif
4343
/* *INDENT-ON */
4444

45-
/* MQTT_DO_NOT_USE_CUSTOM_CONFIG allows building the MQTT library
46-
* without a custom config. If a custom config is provided, the
47-
* MQTT_DO_NOT_USE_CUSTOM_CONFIG macro should not be defined. */
48-
#ifndef MQTT_DO_NOT_USE_CUSTOM_CONFIG
49-
/* Include custom config file before other headers. */
50-
#include "core_mqtt_config.h"
51-
#endif
52-
53-
/* Include config defaults header to get default values of configs not
54-
* defined in core_mqtt_config.h file. */
55-
#include "core_mqtt_config_defaults.h"
56-
5745
#include "transport_interface.h"
5846

5947
/* MQTT packet types. */

test/cbmc/proofs/MQTT_Connect/MQTT_Connect_harness.c

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929
#include "core_mqtt.h"
3030
#include "mqtt_cbmc_state.h"
31+
#include "core_mqtt_config_defaults.h"
3132

3233
/**
3334
* @brief Implement a get time function to return timeout after certain

test/cbmc/proofs/MQTT_Publish/MQTT_Publish_harness.c

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929
#include "core_mqtt.h"
3030
#include "mqtt_cbmc_state.h"
31+
#include "core_mqtt_config_defaults.h"
3132

3233
/**
3334
* @brief Implement a get time function to return timeout after certain

test/cbmc/proofs/MQTT_Subscribe/MQTT_Subscribe_harness.c

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929
#include "core_mqtt.h"
3030
#include "mqtt_cbmc_state.h"
31+
#include "core_mqtt_config_defaults.h"
3132

3233
/**
3334
* @brief Implement a get time function to return timeout after certain

test/cbmc/proofs/MQTT_Unsubscribe/MQTT_Unsubscribe_harness.c

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929
#include "core_mqtt.h"
3030
#include "mqtt_cbmc_state.h"
31+
#include "core_mqtt_config_defaults.h"
3132

3233
/**
3334
* @brief Implement a get time function to return timeout after certain

test/unit-test/core_mqtt_utest.c

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
#include "mock_core_mqtt_serializer.h"
3939
#include "mock_core_mqtt_state.h"
4040

41+
#include "core_mqtt_config_defaults.h"
42+
4143
/* Set network context to double pointer to buffer (uint8_t**). */
4244
struct NetworkContext
4345
{

0 commit comments

Comments
 (0)