From 4107bd22d34e3f4332c166b6f759fe3f4a4c8c11 Mon Sep 17 00:00:00 2001
From: Rahix <rahix@rahix.de>
Date: Mon, 2 Dec 2019 19:30:33 +0100
Subject: [PATCH] hack(ble): Temporarily silence a warning

With the increased warning-level, GCC warns about three unused fields in
`bleSmpCfg`:

    - maxAttemptTimeout: Maximum 'Repeated attempts' timeout in msec
    - attemptDecTimeout: Time msec before attemptExp decreases
    - attemptExp: Exponent to raise attemptTimeout on maxAttempts

These should probably be set to sensible values but to make !360
mergeable, explicitly set them to zero for now.

Signed-off-by: Rahix <rahix@rahix.de>
---
 epicardium/ble/ble_main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/epicardium/ble/ble_main.c b/epicardium/ble/ble_main.c
index 07783d86..3fec7ce4 100644
--- a/epicardium/ble/ble_main.c
+++ b/epicardium/ble/ble_main.c
@@ -122,6 +122,11 @@ static const smpCfg_t bleSmpCfg =
   16,                                     /*! Maximum encryption key length */
   3,                                      /*! Attempts to trigger 'repeated attempts' timeout */
   DM_AUTH_MITM_FLAG,                      /*! Device authentication requirements */
+
+  /* TODO: The following three parameters should probably get proper values */
+  0,                                      /*! Maximum 'Repeated attempts' timeout in msec */
+  0,                                      /*! Time msec before attemptExp decreases */
+  0,                                      /*! Exponent to raise attemptTimeout on maxAttempts */
 };
 
 /* Configuration structure */
-- 
GitLab