From 6fc239ed47b44b82fb14849159f5b22132b6ca94 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 21 Apr 2023 18:13:14 +0200 Subject: [PATCH] Add use strict and use warnings to perl callgrind scripts This way we can simply use #! /usr/bin/env perl and don't need env -S and perl -w flags which might confuse some packaging utilities. --- callgrind/callgrind_annotate.in | 3 ++- callgrind/callgrind_control.in | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/callgrind/callgrind_annotate.in b/callgrind/callgrind_annotate.in index c0715e0649..976fe9b5fb 100644 --- a/callgrind/callgrind_annotate.in +++ b/callgrind/callgrind_annotate.in @@ -1,4 +1,4 @@ -#! /usr/bin/env -S perl -w +#! /usr/bin/env perl ##--------------------------------------------------------------------## ##--- The cache simulation framework: instrumentation, recording ---## ##--- and results printing. ---## @@ -59,6 +59,7 @@ # commifying (halves the number of commify calls) 1.68s --> 1.47s use strict; +use warnings; #---------------------------------------------------------------------------- # Overview: the running example in the comments is for: diff --git a/callgrind/callgrind_control.in b/callgrind/callgrind_control.in index b8969373e4..083ffa29fc 100644 --- a/callgrind/callgrind_control.in +++ b/callgrind/callgrind_control.in @@ -1,4 +1,4 @@ -#! /usr/bin/env -S perl -w +#! /usr/bin/env perl ##--------------------------------------------------------------------## ##--- Control supervision of applications run with callgrind ---## ##--- callgrind_control ---## @@ -21,6 +21,10 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, see . + +use strict; +use warnings; + use File::Basename; # vgdb_exe will be set to a vgdb found 'near' the callgrind_control file -- 2.43.5