Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/picom put parentheses around more memcpy arguments...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d75eff42e6a6
branches:  trunk
changeset: 430605:d75eff42e6a6
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat May 02 11:42:13 2020 +0000

description:
put parentheses around more memcpy arguments that trip up GCC

diffstat:

 x11/picom/distinfo                                  |   4 +-
 x11/picom/patches/patch-src_backend_gl_gl__common.c |  29 +++++++++++++++++---
 2 files changed, 26 insertions(+), 7 deletions(-)

diffs (75 lines):

diff -r bc80e40e8963 -r d75eff42e6a6 x11/picom/distinfo
--- a/x11/picom/distinfo        Sat May 02 11:36:41 2020 +0000
+++ b/x11/picom/distinfo        Sat May 02 11:42:13 2020 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.2 2020/05/02 11:23:04 tnn Exp $
+$NetBSD: distinfo,v 1.3 2020/05/02 11:42:13 tnn Exp $
 
 SHA1 (picom-8.tar.gz) = 9dacc23864ec52a859522e9ac3c66cc171c89dec
 RMD160 (picom-8.tar.gz) = 8a788bbadc0c21585e56fd1e433f4b4425b0dce8
 SHA512 (picom-8.tar.gz) = 154dd42dea16aca463e7d7f9913a8f10740df892bfdda2fee210a94b13c8eaf6201b35e505daf45075fdb1980bb9b85adf170b649702c1b1e2fcdc1d88406b4a
 Size (picom-8.tar.gz) = 242059 bytes
-SHA1 (patch-src_backend_gl_gl__common.c) = e702435b89018fd59d5a48f336c6cfdae644dca6
+SHA1 (patch-src_backend_gl_gl__common.c) = fac2914b6a5b61a6a3c51117ce65eb632923fd83
 SHA1 (patch-src_compiler.h) = 6d659359b70528bd5e6bdd98479502ebd4881976
 SHA1 (patch-src_utils.h) = 31f422592b5f9d232d26f437808b64dc2fb4c0f2
diff -r bc80e40e8963 -r d75eff42e6a6 x11/picom/patches/patch-src_backend_gl_gl__common.c
--- a/x11/picom/patches/patch-src_backend_gl_gl__common.c       Sat May 02 11:36:41 2020 +0000
+++ b/x11/picom/patches/patch-src_backend_gl_gl__common.c       Sat May 02 11:42:13 2020 +0000
@@ -1,12 +1,12 @@
-$NetBSD: patch-src_backend_gl_gl__common.c,v 1.2 2020/05/02 11:23:05 tnn Exp $
+$NetBSD: patch-src_backend_gl_gl__common.c,v 1.3 2020/05/02 11:42:13 tnn Exp $
 
 Parentheses are required around macro argument containing braced initializer
 list.
 memcpy(3) is a macro when using e.g. -D_FORTIFY_SOURCE=2.
 
---- src/backend/gl/gl_common.c.orig    2019-08-18 21:40:33.000000000 +0000
+--- src/backend/gl/gl_common.c.orig    2020-04-21 18:33:17.000000000 +0000
 +++ src/backend/gl/gl_common.c
-@@ -316,7 +316,7 @@ static void x_rect_to_coords(int nrects,
+@@ -485,7 +485,7 @@ x_rect_to_coords(int nrects, const rect_
                //          ri, rx, ry, rxe, rye, rdx, rdy, rdxe, rdye);
  
                memcpy(&coord[i * 16],
@@ -15,7 +15,7 @@
                           {vx1, vy1},
                           {texture_x1, texture_y1},
                           {vx2, vy1},
-@@ -325,11 +325,11 @@ static void x_rect_to_coords(int nrects,
+@@ -494,11 +494,11 @@ x_rect_to_coords(int nrects, const rect_
                           {texture_x2, texture_y2},
                           {vx1, vy2},
                           {texture_x1, texture_y2},
@@ -29,7 +29,7 @@
                       sizeof(GLuint) * 6);
        }
  }
-@@ -673,8 +673,8 @@ _gl_fill(backend_t *base, struct color c
+@@ -886,8 +886,8 @@ static void _gl_fill(backend_t *base, st
                GLint y1 = y_inverted ? height - rect[i].y2 : rect[i].y1,
                      y2 = y_inverted ? height - rect[i].y1 : rect[i].y2;
                memcpy(&coord[i * 8],
@@ -40,3 +40,22 @@
                       sizeof(GLint[2]) * 4);
                indices[i * 6 + 0] = (GLuint)i * 4 + 0;
                indices[i * 6 + 1] = (GLuint)i * 4 + 1;
+@@ -1383,15 +1383,15 @@ void gl_present(backend_t *base, const r
+       for (int i = 0; i < nrects; i++) {
+               // clang-format off
+               memcpy(&coord[i * 8],
+-                     (GLint[]){rect[i].x1, gd->height - rect[i].y2,
++                     ((GLint[]){rect[i].x1, gd->height - rect[i].y2,
+                                rect[i].x2, gd->height - rect[i].y2,
+                                rect[i].x2, gd->height - rect[i].y1,
+-                               rect[i].x1, gd->height - rect[i].y1},
++                               rect[i].x1, gd->height - rect[i].y1}),
+                      sizeof(GLint) * 8);
+               // clang-format on
+ 
+               GLuint u = (GLuint)(i * 4);
+-              memcpy(&indices[i * 6], (GLuint[]){u + 0, u + 1, u + 2, u + 2, u + 3, u + 0},
++              memcpy(&indices[i * 6], ((GLuint[]){u + 0, u + 1, u + 2, u + 2, u + 3, u + 0}),
+                      sizeof(GLuint) * 6);
+       }
+ 



Home | Main Index | Thread Index | Old Index