Add casts to avoid warnings.
authorIan Lance Taylor <iant@google.com>
Sat, 1 Dec 2007 06:45:21 +0000 (06:45 +0000)
committerIan Lance Taylor <iant@google.com>
Sat, 1 Dec 2007 06:45:21 +0000 (06:45 +0000)
gold/stringpool.cc

index 6d3ecfa0e175962b0e25e0bef2e9b5bb39538513..39bb9d0c358988a82c22a7d6b72dcb2afea8c438 100644 (file)
@@ -430,8 +430,9 @@ Stringpool_template<Stringpool_char>::write_to_buffer(unsigned char* buffer,
                                                       size_t bufsize)
 {
   gold_assert(this->strtab_size_ != 0);
-  if (bufsize < this->strtab_size_)   // Quiet the compiler in opt mode.
-    gold_assert(bufsize >= this->strtab_size_);
+   // Quiet the compiler in opt mode.
+  if (bufsize < static_cast<size_t>(this->strtab_size_))
+    gold_assert(bufsize >= static_cast<size_t>(this->strtab_size_));
   if (this->zero_null_)
     buffer[0] = '\0';
   for (typename String_set_type::const_iterator p = this->string_set_.begin();