Merge lp:~muktupavels/compiz/gcc-8.1 into lp:compiz/0.9.13

Proposed by Alberts Muktupāvels
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 4173
Merged at revision: 4170
Proposed branch: lp:~muktupavels/compiz/gcc-8.1
Merge into: lp:compiz/0.9.13
Diff against target: 113 lines (+18/-12)
5 files modified
plugins/animationaddon/src/particle.cpp (+1/-1)
plugins/decor/src/decor.cpp (+2/-4)
plugins/imgsvg/src/imgsvg.cpp (+1/-1)
plugins/wall/src/wall.cpp (+10/-4)
plugins/wall/src/wall.h (+4/-2)
To merge this branch: bzr merge lp:~muktupavels/compiz/gcc-8.1
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Dmitry Shachnev Approve
Review via email: mp+349786@code.launchpad.net

Commit message

Fix build errors with GCC 8.1.

Description of the change

Fix build errors with GCC 8.1.

Revision 4061 added back animationaddon plugin by porting to modern GL API. It changed colors and dcolors from GLfloat to GLushort, but did not update colorSize...

To post a comment you must log in.
lp:~muktupavels/compiz/gcc-8.1 updated
4172. By Alberts Muktupāvels

Fix -Wclass-memaccess errors in wall plugin.

Revision history for this message
Dmitry Shachnev (mitya57) :
review: Approve
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
review: Needs Fixing
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Done.

lp:~muktupavels/compiz/gcc-8.1 updated
4173. By Alberts Muktupāvels

Add constructor for WallCairoContext.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/animationaddon/src/particle.cpp'
2--- plugins/animationaddon/src/particle.cpp 2018-02-21 17:29:21 +0000
3+++ plugins/animationaddon/src/particle.cpp 2018-07-23 14:14:34 +0000
4@@ -117,7 +117,7 @@
5 GLushort *colors = &mColorsCache[0];
6
7 int cornersSize = sizeof (GLfloat) * 12;
8- int colorSize = sizeof (GLfloat) * 4;
9+ int colorSize = sizeof (GLushort) * 4;
10
11 GLfloat cornerCoords[12] = {0.0, 0.0,
12 0.0, 1.0,
13
14=== modified file 'plugins/decor/src/decor.cpp'
15--- plugins/decor/src/decor.cpp 2018-02-21 17:29:21 +0000
16+++ plugins/decor/src/decor.cpp 2018-07-23 14:14:34 +0000
17@@ -1649,8 +1649,7 @@
18 if (!wd)
19 {
20 /* Error condition, reset frame extents */
21- CompWindowExtents emptyExtents;
22- memset (&emptyExtents, 0, sizeof (CompWindowExtents));
23+ CompWindowExtents emptyExtents = CompWindowExtents ();
24 window->setWindowFrameExtents (&emptyExtents, &emptyExtents);
25 return false;
26 }
27@@ -1671,7 +1670,7 @@
28 }
29 else
30 {
31- CompWindowExtents emptyExtents;
32+ CompWindowExtents emptyExtents = CompWindowExtents ();
33
34 if (wd)
35 {
36@@ -1681,7 +1680,6 @@
37
38 /* _NET_FRAME_EXTENTS should be updated before the frame
39 * atom is */
40- memset (&emptyExtents, 0, sizeof (CompWindowExtents));
41
42 window->setWindowFrameExtents (&emptyExtents, &emptyExtents);
43
44
45=== modified file 'plugins/imgsvg/src/imgsvg.cpp'
46--- plugins/imgsvg/src/imgsvg.cpp 2018-02-21 17:29:21 +0000
47+++ plugins/imgsvg/src/imgsvg.cpp 2018-07-23 14:14:34 +0000
48@@ -327,7 +327,7 @@
49 finiTexture (context->texture[1]);
50 initTexture (source, context->texture[1], CompSize ());
51
52- memset (&context->rect, 0, sizeof (BoxRec));
53+ context->rect = CompRect ();
54 context->size.setWidth (0);
55 context->size.setHeight (0);
56 }
57
58=== modified file 'plugins/wall/src/wall.cpp'
59--- plugins/wall/src/wall.cpp 2013-10-30 19:03:53 +0000
60+++ plugins/wall/src/wall.cpp 2018-07-23 14:14:34 +0000
61@@ -53,6 +53,16 @@
62
63 COMPIZ_PLUGIN_20090315 (wall, WallPluginVTable);
64
65+WallCairoContext::WallCairoContext () :
66+ pixmap (0),
67+ texture (0),
68+ surface (NULL),
69+ cr (NULL),
70+ width (0),
71+ height (0)
72+{
73+}
74+
75 void
76 WallScreen::clearCairoLayer (cairo_t *cr)
77 {
78@@ -1646,10 +1656,6 @@
79 // to prevent crashes in XCloseDisplay
80 dlopen ("libcairo.so.2", RTLD_LAZY);
81
82- memset (&switcherContext, 0, sizeof (WallCairoContext));
83- memset (&thumbContext, 0, sizeof (WallCairoContext));
84- memset (&highlightContext, 0, sizeof (WallCairoContext));
85- memset (&arrowContext, 0, sizeof (WallCairoContext));
86 createCairoContexts (true);
87
88 #define setAction(action, dir, win) \
89
90=== modified file 'plugins/wall/src/wall.h'
91--- plugins/wall/src/wall.h 2013-08-28 12:14:25 +0000
92+++ plugins/wall/src/wall.h 2018-07-23 14:14:34 +0000
93@@ -45,8 +45,10 @@
94 } ScreenTransformation;
95
96 /* FIXME: put into own class? */
97-typedef struct _WallCairoContext
98+struct WallCairoContext
99 {
100+ WallCairoContext ();
101+
102 Pixmap pixmap;
103 GLTexture::List texture;
104
105@@ -55,7 +57,7 @@
106
107 int width;
108 int height;
109-} WallCairoContext;
110+};
111
112 /* classes */
113 class WallScreen :

Subscribers

People subscribed via source and target branches