Menu

Treat warnings as error

Help
2009-06-22
2013-03-15
  • Henrik Goldman

    Henrik Goldman - 2009-06-22

    I would like to be able to treat makepp warnings as errors. The reason why is that when compiling code on multiple platforms the output files are not always the same. Eventually makepp gives warnings which should be handled. However when running makepp using automated builds these warnings can be missed.
    Thus I would like to have a hard stop to ensure that it gets properly fixed.

    Is this possible?

     
    • Daniel Pfeiffer

      Daniel Pfeiffer - 2009-06-22

      Hi Henrik,

      do it the normal Perl way, by promoting warn to die:

      perl {
          $SIG{__WARN__} = sub { die $_[0] };
      }

      # Naughty, forgot phony:
      oho: aha
          &echo oho

      aha:
          &echo aha

       

Log in to post a comment.