Ticket #295: verbose-warnings.patch

File verbose-warnings.patch, 3.4 KB (added by Yuri Dario, 10 years ago)
  • stabshll.c

     
    381381
    382382static int unnamed_struct_number;
    383383
     384/* Show more warnings if this variable is TRUE (-v option). */
     385extern int verbose;
     386
    384387/* kso #456 2003-06-11: Reversed quiet workaround. */
    385388#define no_warning warning_parse
    386389
     
    17811784        t.index = 0x8a;         /* 80 bit real */
    17821785      else
    17831786        {
    1784           no_warning ("Unknown range type: %lld..%lld", range_lo, range_hi);
     1787          if (verbose) no_warning ("Unknown range type: %lld..%lld", range_lo, range_hi);
    17851788          goto syntax;
    17861789        }
    17871790      break;
     
    20242027              }
    20252028            else
    20262029              {
    2027                 warning_parse ("Invalid BASE_OFFSET GNU extension format!");
     2030                if (verbose) warning_parse ("Invalid BASE_OFFSET GNU extension format!");
    20282031                goto syntax;
    20292032              }
    20302033            break;
     
    26932696       * The normal issue is C++ class references. */
    26942697      if (tp->tag != ty_alias || tp->index <= -3)
    26952698        {
    2696           warning_parse ("Cycle detected by make_type.");
     2699          if (verbose) warning_parse ("Cycle detected by make_type.");
    26972700          RETURN (0);
    26982701        }
    26992702    }
     
    27062709      t1 = stype_find (tp->d.stabs_ref);
    27072710      if (t1 == NULL)
    27082711        {
    2709           warning_parse ("Undefined stabs type %d referenced", tp->d.stabs_ref);
     2712          if (verbose) warning_parse ("Undefined stabs type %d referenced", tp->d.stabs_ref);
    27102713          RETURN (0x82);        /* 32 bit signed */
    27112714        }
    27122715      make_type (t1, &tp->index);
  • emxomf.c

     
    407407/* Supress certain warnings if this variable is TRUE (-q option). */
    408408static int quiet = FALSE;
    409409
     410/* Show more warnings if this variable is TRUE (-v option). */
     411int verbose = FALSE;
     412
    410413/* The libreq_head variable contains a pointer to the head of the list
    411414   of default libraries.  The -i option is used to add a default
    412415   library request.  The libreq_add pointer is used for appending new
     
    587590}
    588591
    589592
    590 /* Set the hll_type of a symbols. */
     593/* Set the hll_type of a symbol. */
    591594void set_hll_type (int index, int hll_type)
    592595{
    593596  if (index > sym_count || index < 0)
     
    822825        memcpy(pszOutBuf + SYMBOL_MAX_LENGTH, szHash, SYMBOL_HASH_LENGTH);
    823826        pszOutBuf[SYMBOL_MAX_LENGTH + SYMBOL_HASH_LENGTH] = '\0';
    824827
    825         warning ("Truncated symbol '%.*s' to '%.*s%s'", cch, pszName, SYMBOL_MAX_LENGTH, pszName, szHash);
     828        if (verbose)
     829                warning ("Truncated symbol '%.*s' to '%.*s%s'", cch, pszName, SYMBOL_MAX_LENGTH, pszName, szHash);
    826830
    827831        cch = SYMBOL_MAX_LENGTH + SYMBOL_HASH_LENGTH;
    828832    }
     
    37443761  puts ("  -O <directory>     Extract files to <directory>");
    37453762  puts ("  -z                 Remove underscores from all symbol names");
    37463763  puts ("  -P <dbgpackdll>    Name the dbgpack DLL (ilink)");
     3764  puts ("  -v                 Show more warnings (truncated symbols and HLL warnings)");
    37473765  exit (1);
    37483766}
    37493767
     
    42444262      case 'u':
    42454263        unknown_stabs = TRUE;
    42464264        break;
     4265      case 'v':
     4266        verbose = TRUE;
     4267        break;
    42474268      case 'x':
    42484269        opt_x = TRUE;
    42494270        break;