From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3D9541F452 for ; Sat, 6 May 2023 07:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1683358078; bh=nEFZhhBl2E3GPo2TduiIdPtxZGQDpSwBlm+pH7ZKtbQ=; h=From:To:Subject:Date:From; b=MvF6OketZFWIDVgfrqCzB76KT7P0B1s4pSrnMPXHXZAk1ju6Y9Xu2ch7inQ2IoFQe RU77NO4o9MGZEbBKzZ4xI8Dy0C62i5PHiHDq+t/eLjtH8gwo+/7Ry8dJAx/AE7KPLl fqg1GaHM7UvBRuGBvDMYraVXHEu25VE89lxevvps= From: Eric Wong To: mwrap-perl@80x24.org Subject: [PATCH] location_name: fix uninitialized variable warnings Date: Sat, 6 May 2023 07:27:58 +0000 Message-ID: <20230506072758.4381-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Apparently, the proper way to create an empty character strings is still via newSVpvs(""), and not newSV(0) :x --- Mwrap.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mwrap.xs b/Mwrap.xs index cbb7d15..e51259e 100644 --- a/Mwrap.xs +++ b/Mwrap.xs @@ -20,7 +20,7 @@ typedef struct src_loc * Devel__Mwrap__SrcLoc; /* keep this consistent with httpd.h write_loc_name */ static SV *location_string(struct src_loc *l) { - SV *ret = newSV(0); + SV *ret = newSVpvs(""); if (l->f) { sv_catpv(ret, l->f->fn);