Skip to content

Commit 681cff8

Browse files
authored
Merge pull request #2785 from pan-/remove_warnings_from_nordic_target
TARGET_NRF - Remove warnings from nordic target.
2 parents 816f028 + 6831721 commit 681cff8

File tree

33 files changed

+45
-69
lines changed

33 files changed

+45
-69
lines changed

features/FEATURE_BLE/ble/deprecate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
#define __deprecated_message(msg)
2424
#endif
2525

26-
#endif
26+
#endif

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/ble/common/ble_conn_state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void record_purge_disconnected()
169169
m_bcs.valid_conn_handles,
170170
(~m_bcs.flags.connected_flags) & (m_bcs.flags.valid_flags));
171171

172-
for (int i = 0; i < disconnected_list.len; i++)
172+
for (uint32_t i = 0; i < disconnected_list.len; i++)
173173
{
174174
record_invalidate(disconnected_list.flag_keys[i]);
175175
}

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/ble/peer_manager/peer_database.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static pdb_buffer_record_t * write_buffer_record_find_unused(void)
172172
*/
173173
static void write_buffer_record_release(pdb_buffer_record_t * p_write_buffer_record)
174174
{
175-
for (int i = 0; i < p_write_buffer_record->n_bufs; i++)
175+
for (uint32_t i = 0; i < p_write_buffer_record->n_bufs; i++)
176176
{
177177
pm_buffer_release(&m_pdb.write_buffer, p_write_buffer_record->buffer_block_id + i);
178178
}

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/ble/peer_manager/pm_buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ uint8_t pm_buffer_block_acquire(pm_buffer_t * p_buffer, uint32_t n_blocks)
9393
{
9494
first_locked_mutex = i;
9595
}
96-
if ((i - first_locked_mutex + 1) == n_blocks)
96+
if ((i - first_locked_mutex + 1) >= 0 && ((uint32_t)(i - first_locked_mutex + 1)) == n_blocks)
9797
{
9898
return first_locked_mutex;
9999
}

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/delay/nrf_delay.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ __STATIC_INLINE void nrf_delay_us(uint32_t volatile number_of_us)
191191

192192
#elif defined ( __GNUC__ )
193193

194-
static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline));
195-
static void __INLINE nrf_delay_us(uint32_t volatile number_of_us)
194+
static __INLINE void nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline));
195+
static __INLINE void nrf_delay_us(uint32_t volatile number_of_us)
196196
{
197197
register uint32_t delay __ASM ("r0") = number_of_us;
198198
__ASM volatile (

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/fds/fds.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#include "nrf_error.h"
4141
#include "app_util.h"
4242

43+
static void fs_callback(uint8_t op_code,
44+
uint32_t result,
45+
uint32_t const * p_data,
46+
fs_length_t length_words);
4347

4448
/** Our fstorage configuration.
4549
* The other fields will be assigned automatically during compilation. */

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/fds/fds_types_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#define FDS_CMD_QUEUE_SIZE_GC (1)
6969

7070

71-
static uint8_t m_nested_critical;
71+
//static uint8_t m_nested_critical;
7272

7373
/** Macros to enable and disable application interrupts. */
7474
#define CRITICAL_SECTION_ENTER() //sd_nvic_critical_region_enter(&m_nested_critical)

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/fstorage/fstorage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ void fs_debug_print()
559559
printf("Num items: 0x%08lx\r\n", (unsigned long)FS_SECTION_VARS_COUNT);
560560
printf("===== ITEMS %lu =====\r\n", (unsigned long)FS_SECTION_VARS_COUNT);
561561

562-
for(int i = 0; i < FS_SECTION_VARS_COUNT; i++)
562+
for(uint32_t i = 0; i < FS_SECTION_VARS_COUNT; i++)
563563
{
564564
fs_config_t* config = FS_SECTION_VARS_GET(i);
565565
printf( "Address: 0x%08lx, CB: 0x%08lx\r\n",

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/fstorage/fstorage.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,6 @@ typedef void (*fs_cb_t)(uint8_t op_code,
7474
fs_length_t length_words);
7575

7676

77-
/**@brief Function prototype for a callback handler.
78-
*
79-
* @details This function is expected to be implemented by the module that
80-
* registers for fstorage usage. Its usage is described
81-
* in the function pointer type fs_cb_t.
82-
*
83-
* @param[in] op_code Flash operation code.
84-
* @param[in] result Result of the flash operation.
85-
* @param[in] p_data Pointer to the resulting data (or NULL if not in use).
86-
* @param[in] length_words Length of data in words.
87-
*/
88-
static void fs_callback(uint8_t op_code,
89-
uint32_t result,
90-
uint32_t const * p_data,
91-
fs_length_t length_words);
92-
93-
9477
/**@brief Flash storage config variable.
9578
*
9679
* @details The fstorage module will update the start_addr and end_address according to

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/util/app_util_platform.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ typedef enum
6868
#define EXTERNAL_INT_VECTOR_OFFSET 16
6969
/**@endcond */
7070

71-
#define PACKED(TYPE) __packed TYPE
72-
7371
void critical_region_enter (void);
7472
void critical_region_exit (void);
7573

0 commit comments

Comments
 (0)