Skip to content

Commit

Permalink
Resolve the wrong offset type format warning
Browse files Browse the repository at this point in the history
Clang returns the bellow warning while compiling the `PdbScanner.cpp`
compilation module:

warning: format specifies type 'int' but the argument has type 'DWORD'
(aka 'unsigned long')
ERRMSG("Unknown offset type: %d, name: %s", locType,
newField->_name.c_str());

The `%d` format string is replaced with `%lu`.

Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
  • Loading branch information
samolisov committed Apr 18, 2018
1 parent 2e13e77 commit b8ca37a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ddr/lib/ddr-scanner/pdb/PdbScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ PdbScanner::setMemberOffset(IDiaSymbol *symbol, Field *newField)
break;
}
default:
ERRMSG("Unknown offset type: %d, name: %s", locType, newField->_name.c_str());
ERRMSG("Unknown offset type: %lu, name: %s", locType, newField->_name.c_str());
rc = DDR_RC_ERROR;
break;
}
Expand Down Expand Up @@ -1025,7 +1025,7 @@ PdbScanner::setType(IDiaSymbol *symbol, Type **type, Modifiers *modifiers, Names
*type = getType("void");
break;
default:
ERRMSG("unknown symtag: %d", symTag);
ERRMSG("unknown symtag: %lu", symTag);
rc = DDR_RC_ERROR;
break;
}
Expand Down

0 comments on commit b8ca37a

Please sign in to comment.