mk-audit: Useless use of a constant in void context

Bug #716151 reported by mf
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maatkit (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

Binary package hint: maatkit

Description: Ubuntu 10.04.2 LTS
Release: 10.04

# apt-cache policy maatkit
maatkit:
  Installed: 5427-1
  Candidate: 5427-1
  Version table:
 *** 5427-1 0
        500 http://de.archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

mk-audit supports the MKDEBUG env variable:
  MKDEBUG=1 mk-audit ...

but if you omit that, it fails:
  root@host:~/# mk-audit
  Useless use of a constant in void context at /usr/bin/mk-audit line 721.

this is caused by the definition of constant MKDEBUG:
     use constant MKDEBUG => $ENV{MKDEBUG};
which may result in 'undef'.

Can be fixed by this definition:
    use constant MKDEBUG => $ENV{MKDEBUG}?$ENV{MKDEBUG}:0;

(at all lines where MKDEBUG is defined).

Regards
Matthias

Tags: patch
Revision history for this message
mf (mf-14v) wrote :
tags: added: patch
Revision history for this message
Dario Minnucci (midget) wrote :

mk-audit was retired and removed from Maatkit over a year ago.
It was/is being replaced by mk-query-advisor, mk-variable-advisor, mk-schema-advisor (not yet developed) and mk-config-diff.

Changed in maatkit (Ubuntu):
status: New → Invalid
status: Invalid → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.