Merge lp:~bregma/geis/deb-811933 into lp:geis

Proposed by Stephen M. Webb on 2016-01-26
Status: Merged
Approved by: Christopher Townsend on 2016-01-26
Approved revision: 337
Merged at revision: 337
Proposed branch: lp:~bregma/geis/deb-811933
Merge into: lp:geis
Diff against target: 55 lines (+10/-4)
3 files modified
libgeis/backend/grail/geis_grail_backend.c (+6/-2)
libgeis/geis_subscription.c (+2/-0)
libs/geis-util/geis_bag.h (+2/-2)
To merge this branch: bzr merge lp:~bregma/geis/deb-811933
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve on 2016-01-26
Christopher Townsend 2016-01-26 Approve on 2016-01-26
Review via email: mp+283980@code.launchpad.net

Commit message

fix error revealed by GCC-6

Description of the change

Fix errors detected by rebuilding with GCC-6.

(1) unused constants in a header (replaced with #define)
(2) bracing error in an if-statement (may have caused memory leaks)

Fixes Debian bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811933

To post a comment you must log in.
Christopher Townsend (townsend) wrote :

Yep, looks correct.

review: Approve
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libgeis/backend/grail/geis_grail_backend.c'
2--- libgeis/backend/grail/geis_grail_backend.c 2015-07-22 20:20:25 +0000
3+++ libgeis/backend/grail/geis_grail_backend.c 2016-01-26 15:37:29 +0000
4@@ -1431,7 +1431,9 @@
5 _grail_be_grail_fd_callback,
6 gbe);
7
8- gbe->devices = geis_bag_new(sizeof(UFDevice), 2, 2.0f);
9+ gbe->devices = geis_bag_new(sizeof(UFDevice),
10+ geis_bag_default_init_alloc,
11+ geis_bag_default_growth_factor);
12 if (!gbe->devices)
13 {
14 geis_error("failed to create UFDevices store");
15@@ -1447,7 +1449,9 @@
16 goto unwind_devices;
17 }
18
19- gbe->slice_states = geis_bag_new(sizeof(struct _GeisSliceState), 2, 1.5f);
20+ gbe->slice_states = geis_bag_new(sizeof(struct _GeisSliceState),
21+ geis_bag_default_init_alloc,
22+ geis_bag_default_growth_factor);
23 if (!gbe->slice_states)
24 {
25 geis_error("failed to create slice times store");
26
27=== modified file 'libgeis/geis_subscription.c'
28--- libgeis/geis_subscription.c 2012-12-04 12:39:16 +0000
29+++ libgeis/geis_subscription.c 2016-01-26 15:37:29 +0000
30@@ -238,8 +238,10 @@
31 for (i = 0; i < bag->sub_store_size; ++i)
32 {
33 if (bag->sub_store[i])
34+ {
35 _subscription_unref(bag->sub_store[i]);
36 bag->sub_store[i] = NULL;
37+ }
38 }
39 }
40
41
42=== modified file 'libs/geis-util/geis_bag.h'
43--- libs/geis-util/geis_bag.h 2011-12-21 17:35:47 +0000
44+++ libs/geis-util/geis_bag.h 2016-01-26 15:37:29 +0000
45@@ -52,8 +52,8 @@
46 };
47
48
49-static const GeisSize geis_bag_default_init_alloc = 2;
50-static const GeisFloat geis_bag_default_growth_factor = 1.5f;
51+#define geis_bag_default_init_alloc 2
52+#define geis_bag_default_growth_factor 1.5f
53
54
55 /**

Subscribers

People subscribed via source and target branches