Skip Menu |

This queue is for tickets about the File-Map CPAN distribution.

Report information
The Basics
Id: 124497
Status: new
Priority: 0/
Queue: File-Map

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.65
Fixed in: (no value)



Subject: Compiler warnings
When building with GCC 8 against a threaded perl, I recieve three warnings about unsused variables or values. Attached patch fixes them.
Subject: 0001-Silent-compiler-warnings.patch
From c75dedc08e976039d662156092a3a85acaf37538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Tue, 20 Feb 2018 13:24:15 +0100 Subject: [PATCH] Silent compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch silents GCC 8 warnigs: lib/File/Map.xs: In function 'empty_write': lib/File/Map.xs:205:20: warning: unused variable 'info' [-Wunused-variable] struct mmap_info* info = (struct mmap_info*) magic->mg_ptr; ^~~~ lib/File/Map.xs: In function 'boot': lib/File/Map.xs:440:6: warning: unused variable 'constants' [-Wunused-variable] AV* constants = newAV(); ^~~~~~~~~ In file included from /usr/lib64/perl5/CORE/perl.h:5589, from lib/File/Map.xs:58: lib/File/Map.xs: In function 'XS_File__Map_wait_until': /usr/lib64/perl5/CORE/pp.h:145:16: warning: value computed is not used [-Wunused-value] #define POPs (*sp--) ~^~~~~~ lib/File/Map.xs:705:4: note: in expansion of macro 'POPs' POPs; ^~~~ Signed-off-by: Petr Písař <ppisar@redhat.com> diff --git a/lib/File/Map.xs b/lib/File/Map.xs index 69f2709..89c74d4 100644 --- a/lib/File/Map.xs +++ b/lib/File/Map.xs @@ -202,7 +202,6 @@ static int mmap_write(pTHX_ SV* var, MAGIC* magic) { } static int empty_write(pTHX_ SV* var, MAGIC* magic) { - struct mmap_info* info = (struct mmap_info*) magic->mg_ptr; if (!SvPOK(var) || sv_len(var) != 0) { sv_setpvn(var, "", 0); if (ckWARN(WARN_SUBSTR)) @@ -437,7 +436,6 @@ static int S_protection_value(pTHX_ SV* mode, int fallback) { } STMT_END static void boot(pTHX) { - AV* constants = newAV(); HV* stash = get_hv("File::Map::", FALSE); HV* advise_constants = newHV(); @@ -702,7 +700,7 @@ wait_until(block, var) SPAGAIN; if (SvTRUE(TOPs)) break; - POPs; + (void)POPs; COND_WAIT(&info->cond, &info->data_mutex); } -- 2.13.6