From 718b313cf3fee3799cdea3ecbbfba8a615066baf Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 Jan 2023 07:38:49 +0000 Subject: simplify mw_perl_src_file_cstr to avoid gcc warning This works around a gcc (Debian 10.2.1-6) warning, and is less code, even --- mwrap_core.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mwrap_core.h b/mwrap_core.h index 15df857..deb3bb3 100644 --- a/mwrap_core.h +++ b/mwrap_core.h @@ -389,10 +389,8 @@ static const char *mw_perl_src_file_cstr(unsigned *lineno) { const COP *cop = mwp_curcop(); if (!cop) return NULL; - const char *fn = CopFILE(cop); - if (!fn) return NULL; *lineno = CopLINE(cop); - return fn; + return CopFILE(cop); } # define SRC_FILE_CSTR(lineno) mw_perl_src_file_cstr(lineno) #endif /* MWRAP_PERL */ -- cgit v1.2.3-24-ge0c7