From 01e293f1b52bd16b5b487f5003cce4948786c474 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 13 Jan 2009 14:40:35 -0800 Subject: [PATCH] Use "use warnings" rather than -w on the #! line. --- packaging/patch-update | 3 ++- packaging/release-rsync | 3 ++- packaging/var-checker | 3 ++- support/git-set-file-times | 3 ++- support/instant-rsyncd | 4 +++- support/mnt-excl | 3 ++- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/packaging/patch-update b/packaging/patch-update index 46d9ff8f..30a29bce 100755 --- a/packaging/patch-update +++ b/packaging/patch-update @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # This script is used to turn one or more of the "patch/*" branches # into one or more diffs in the "patches" directory. Pass the option # --gen if you want generated files in the diffs. Pass the name of @@ -6,6 +6,7 @@ # diffs. use strict; +use warnings; use Getopt::Long; my $patches_dir = 'patches'; diff --git a/packaging/release-rsync b/packaging/release-rsync index 957e8929..71bb18e2 100755 --- a/packaging/release-rsync +++ b/packaging/release-rsync @@ -1,5 +1,6 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl use strict; +use warnings; # This script expects the directory ~/samba-rsync-ftp to exist and to be a # copy of the /home/ftp/pub/rsync dir on samba.org. When the script is done, diff --git a/packaging/var-checker b/packaging/var-checker index 445bea0e..7c017252 100755 --- a/packaging/var-checker +++ b/packaging/var-checker @@ -1,9 +1,10 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # This script checks the *.c files for extraneous "extern" variables, # for vars that are defined but not used, and for inconsistent array # sizes. Run it from inside the main rsync directory. use strict; +use warnings; my %add_syscall_c = map { $_ => 1 } qw( t_stub.c t_unsafe.c tls.c trimslash.c ); my %add_compat_c = map { $_ => 1 } qw( t_stub.c tls.c trimslash.c wildtest.c ); diff --git a/support/git-set-file-times b/support/git-set-file-times index 85d854e8..077ac0e0 100755 --- a/support/git-set-file-times +++ b/support/git-set-file-times @@ -1,5 +1,6 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl use strict; +use warnings; # Sets mtime and atime of files to the latest commit time in git. # diff --git a/support/instant-rsyncd b/support/instant-rsyncd index 6ab1e66d..e9efb1ab 100755 --- a/support/instant-rsyncd +++ b/support/instant-rsyncd @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # instant-rsyncd lets you quickly set up and start a simple, unprivileged rsync # daemon with a single module in the current directory. I've found it @@ -12,6 +12,8 @@ # and once to log in to test the daemon. # -- Matt McCutchen +set -e + dir="$(pwd)" echo diff --git a/support/mnt-excl b/support/mnt-excl index 5514d96d..c6df5866 100755 --- a/support/mnt-excl +++ b/support/mnt-excl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # This script takes a command-line arg of a source directory # that will be passed to rsync, and generates a set of excludes # that will exclude all mount points from the list. This is @@ -25,6 +25,7 @@ # awk '{print $2}' /proc/mounts | rsync -f 'merge,/- -' host:/dir /dest/ use strict; +use warnings; use Cwd 'abs_path'; my $file = '/proc/mounts'; -- 2.34.1