Thread (12 messages) flat view 12 messages, 2 authors, 2012-07-24

Re: [PATCH 3/9] Battery: Discover Characteristic Descriptors

From: Claudio Takahasi <hidden>
Date: 2012-07-23 20:08:12

Hi Chen Ganir:

On Tue, Jul 17, 2012 at 10:59 AM, Chen Ganir [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Discover all characteristic descriptors, and build a descriptor
list
---
 profiles/batterystate/batterystate.c |   70 ++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)
diff --git a/profiles/batterystate/batterystate.c b/profiles/batterystate/batterystate.c
index 40663f6..18045ed 100644
--- a/profiles/batterystate/batterystate.c
+++ b/profiles/batterystate/batterystate.c
@@ -50,8 +50,24 @@ static GSList *servers;
 struct characteristic {
        struct gatt_char        attr;   /* Characteristic */
        struct battery          *batt;  /* Parent Battery Service */
+       GSList                          *desc;  /* Descriptors */
 };

+struct descriptor {
+       struct characteristic   *ch;    /* Parent Characteristic */
+       uint16_t                handle; /* Descriptor Handle */
+       bt_uuid_t               uuid;   /* UUID */
+};
+
+static void char_free(gpointer user_data)
+{
+       struct characteristic *c = user_data;
+
+       g_slist_free_full(c->desc, g_free);
+
+       g_free(c);
+}
Please fix the following warning:

profiles/batterystate/batterystate.c:62:13: error: 'char_free' defined
but not used [-Werror=unused-function]
cc1: all warnings being treated as errors

BR,
Claudio
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help