Skip to content

Commit

Permalink
Merge pull request #4 from d-b-w/master
Browse files Browse the repository at this point in the history
Address build warning messages found while building rdkit
  • Loading branch information
torcolvin authored Jun 1, 2018
2 parents 0f390d5 + 1f864ee commit 0e15d0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ bool BufferDataCollector::load(BufferData& data, const char* begin,
return succeeded;
}

size_t BufferDataCollector::readData(char* ptr, size_t size) const
size_t BufferDataCollector::readData(char*, size_t) const
{
// char* ptr, size_t size are unnamed to avoid compilation warning messages.

// The BufferDataCollector doesn't actually read any data directly; it
// delegates that to its member BufferLoader instance.
return 0;
Expand Down
13 changes: 8 additions & 5 deletions MaeParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ static std::string outer_block_name(Buffer& buffer);
void read_exception::format(int line_number, int column, const char* msg)
{
#ifdef _MSC_VER
_snprintf(m_msg, MAEPARSER_EXCEPTION_BUFFER_SIZE, "Line %d, column %d: %s\n", line_number,
_snprintf(m_msg, MAEPARSER_EXCEPTION_BUFFER_SIZE,
"Line %d, column %d: %s\n", line_number,
#else
snprintf(m_msg, MAEPARSER_EXCEPTION_BUFFER_SIZE, "Line %d, column %d: %s\n", line_number,
snprintf(m_msg, MAEPARSER_EXCEPTION_BUFFER_SIZE, "Line %d, column %d: %s\n",
line_number,
#endif
column, msg);
column, msg);
m_msg[MAEPARSER_EXCEPTION_BUFFER_SIZE - 1] = '\0';
}

Expand Down Expand Up @@ -175,7 +177,8 @@ template <> EXPORT_MAEPARSER double parse_value<double>(Buffer& buffer)
return value;
}

template <> EXPORT_MAEPARSER std::string parse_value<std::string>(Buffer& buffer)
template <>
EXPORT_MAEPARSER std::string parse_value<std::string>(Buffer& buffer)
{
char* save = buffer.current;
if (*buffer.current != '"') {
Expand Down Expand Up @@ -545,7 +548,7 @@ void DirectIndexedBlockParser::parse(const std::string& name, size_t size,
parsers.push_back(p);
}

for (int i = 0; i < size; ++i) {
for (size_t i = 0; i < size; ++i) {
for (auto parser : parsers) {
whitespace(buffer);
parser->parse(buffer);
Expand Down

0 comments on commit 0e15d0e

Please sign in to comment.