diff mbox series

cgcc: use strict & warnings

Message ID 20190225223555.26168-1-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series cgcc: use strict & warnings | expand

Commit Message

Luc Van Oostenryck Feb. 25, 2019, 10:35 p.m. UTC
Better to declare undeclared or unintialized vars early,
so use the 'strict' & 'warnings' pragmas.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 cgcc | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/cgcc b/cgcc
index 90cc5f77b..add35cba9 100755
--- a/cgcc
+++ b/cgcc
@@ -1,6 +1,9 @@ 
 #!/usr/bin/perl -w
 # -----------------------------------------------------------------------------
 
+use strict;
+use warnings;
+
 my $cc = $ENV{'REAL_CC'} || 'cc';
 my $check = $ENV{'CHECK'} || 'sparse';
 my $ccom = $cc;