From b73fa1cc28550666ff4c77c9b3f130f72f4c97a6 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 17 Feb 2019 18:43:02 +0100 Subject: [PATCH] Reduce scope of data variable This fixes a warning from Codacy. Signed-off-by: Uli Schlachter --- objects/selection_transfer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/objects/selection_transfer.c b/objects/selection_transfer.c index d721757e3..e15530148 100644 --- a/objects/selection_transfer.c +++ b/objects/selection_transfer.c @@ -198,7 +198,6 @@ static int luaA_selection_transfer_send(lua_State *L) { size_t data_length; - const char *data; bool incr = false; size_t incr_size = 0; @@ -278,7 +277,7 @@ luaA_selection_transfer_send(lua_State *L) len, &atoms[0]); } else { /* 'data' is a string with the data to transfer */ - data = luaL_checklstring(L, -1, &data_length); + const char *data = luaL_checklstring(L, -1, &data_length); if (!incr) incr_size = data_length;