I found an apparent bug in valnum.cpp

This bit of code from valnum.cpp declares c inside a conditional but uses it outside the conditional. Moving its declaration outside the conditional allowed compiling.

void wxNumValidatorBase::OnChar(wxKeyEvent& event)
{
    // By default we just validate this key so don't prevent the normal
    // handling from taking place.
    event.Skip();

    if ( !m_validatorWindow )
        return;

#if wxUSE_UNICODE
    const int ch = event.GetUnicodeKey();
    const int c = event.GetKeyCode();
    if ( c > WXK_START )
    {
        // It's a character without any Unicode equivalent at all, e.g. cursor
        // arrow or function key, we never filter those.
        return;
    }
#else // !wxUSE_UNICODE
    const int ch = event.GetKeyCode();
    if ( ch > WXK_DELETE )
    {
        // Not a character neither.
        return;
    }
#endif // wxUSE_UNICODE/!wxUSE_UNICODE

    if ( c < WXK_SPACE || c == WXK_DELETE )
    {
        // Allow ASCII control characters and Delete.
        return;
    }

Thanks for the report.
I’ll pass this on to the developers.

I agree that this is an error, but I’m surprised that it caused a problem because (normally) we should be using Unicode.

I figured that, being the first person to report this bug so late in the day, and it only happens to people not compiling for unicode, I must be the first to try. I don’t disable unicode with configure; it’s enabled by default, so I don’t know why this happened to me.

A fix for the “valnum” bug has just been committed into the current “alpha” code.
If you’re interested, this is what was committed:

Modified:
  /audacity-src/trunk/src/widgets/valnum.cpp

=======================================
--- /audacity-src/trunk/src/widgets/valnum.cpp        Sun Nov 16 13:39:18 2014 UTC
+++ /audacity-src/trunk/src/widgets/valnum.cpp        Sun Dec 28 20:02:00 2014 UTC
@@ -159,6 +159,7 @@
      }
  #else // !wxUSE_UNICODE
      const int ch = event.GetKeyCode();
+    const int c = ch;
      if ( ch > WXK_DELETE )
      {
          // Not a character neither.