[vte/vte-0-34] widget: Fix sizeof error in memset



commit ba74252d91898e5e03e16daa888d09797ac274fd
Author: Christian Persch <chpe gnome org>
Date:   Mon Sep 16 23:02:09 2013 +0200

    widget: Fix sizeof error in memset
    
    vte.c: In function 'vte_terminal_reset':
    vte.c:14135:16: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; 
did you mean to remove the addressof? [-Wsizeof-pointer-memaccess]
              sizeof(&pvt->selection_origin));
                     ^

 src/vte.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index f0e4b6a..b6582d7 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -14132,13 +14132,13 @@ vte_terminal_reset(VteTerminal *terminal,
                g_free(pvt->selection);
                pvt->selection = NULL;
                memset(&pvt->selection_origin, 0,
-                      sizeof(&pvt->selection_origin));
+                      sizeof(pvt->selection_origin));
                memset(&pvt->selection_last, 0,
-                      sizeof(&pvt->selection_last));
+                      sizeof(pvt->selection_last));
                memset(&pvt->selection_start, 0,
-                      sizeof(&pvt->selection_start));
+                      sizeof(pvt->selection_start));
                memset(&pvt->selection_end, 0,
-                      sizeof(&pvt->selection_end));
+                      sizeof(pvt->selection_end));
        }
        /* Reset mouse motion events. */
        pvt->mouse_tracking_mode = MOUSE_TRACKING_NONE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]