Changeset 56e49b0


Ignore:
Timestamp:
Aug 7, 2017, 12:35:05 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
acd7c5dd
Parents:
92c0f81
Message:

Fixed some assertf related warnings

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CurrentObject.cc

    r92c0f81 r56e49b0  
    3636                                return constExpr->get_constant()->get_ival();
    3737                        } else {
    38                                 assertf( false, "Non-integer constant expression in getConstValue", toString( constExpr ).c_str() ); // xxx - might be semantic error
     38                                assertf( false, "Non-integer constant expression in getConstValue %s", toString( constExpr ).c_str() ); // xxx - might be semantic error
    3939                        }
    4040                } else if ( dynamic_cast< OneType * >( constExpr->get_result() ) ) {
     
    176176                                setPosition( castExpr->get_arg() );
    177177                        } else if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( expr ) ) {
    178                                 assertf( dynamic_cast<EnumInstType *> ( varExpr->get_result() ), "ArrayIterator given variable that isn't an enum constant", toString( expr ).c_str() );
     178                                assertf( dynamic_cast<EnumInstType *> ( varExpr->get_result() ), "ArrayIterator given variable that isn't an enum constant : %s", toString( expr ).c_str() );
    179179                                index = 0; // xxx - get actual value of enum constant
    180180                        } else if ( dynamic_cast< SizeofExpr * >( expr ) || dynamic_cast< AlignofExpr * >( expr ) ) {
     
    518518                        curTypes = newTypes;
    519519                        newTypes.clear();
    520                         assertf( desigAlts.size() == curTypes.size(), "Designator alternatives (%d) and current types (%d) out of sync", desigAlts.size(), curTypes.size() );
     520                        assertf( desigAlts.size() == curTypes.size(), "Designator alternatives (%zu) and current types (%zu) out of sync", desigAlts.size(), curTypes.size() );
    521521                } // for
    522522                if ( desigAlts.size() > 1 ) {
  • src/SymTab/Validate.cc

    r92c0f81 r56e49b0  
    903903                FunctionType * ftype = functionDecl->get_functionType();
    904904                std::list< DeclarationWithType * > & retVals = ftype->get_returnVals();
    905                 assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %d", functionDecl->get_name().c_str(), retVals.size() );
     905                assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %zu", functionDecl->get_name().c_str(), retVals.size() );
    906906                if ( retVals.size() == 1 ) {
    907907                        // ensure all function return values have a name - use the name of the function to disambiguate (this also provides a nice bit of help for debugging).
Note: See TracChangeset for help on using the changeset viewer.