Hi List,

I've tried compiling Hypertable with Intel C++ compiler 10.1. The news
is good - Hypertable compiles
very cleanly with only a few warnings from the compiler. Here they are:


/Users/m/work/hypertable/src/cc/ThriftBroker/gen-cpp/ClientService.h(1824):
warning #1011: missing return statement at end of non-void function
"Hypertable::ThriftGen::ClientServiceMultiface::open_scanner"
    }

The above one is very common in ClientService.h and is caused by
compiler confusion
because of this construct

    for (uint32_t i = 0; i < sizeOfSomething; ++i) {
      if (i == sizeOfSomething - 1) {
         return finalValue;
      } else {
         do something else
      }
    }

This warning is repeating itself throughout the whole compilation itself
and makes you feel scary when compiling ;)


/Users/m/work/hypertable/src/cc/Hypertable/Lib/Cell.h(35): warning
#68: integer conversion resulted in a change of sign
          timestamp(AUTO_ASSIGN), revision(AUTO_ASSIGN), value(0), value_len(0),
                                           ^

the same happens for revision(AUTO_ASSIGN). This warning gets
triggered by AUTO_ASSIGN being int64_t
while all variables it's being assigned to are uint64_t. Intel
compiler complains about it very loudly and often.




/Users/m/work/hypertable/src/cc/Hypertable/Lib/CommitLog.cc(53):
warning #177: function "<unnamed>::forward_sort_clfi::operator()" was
declared but never referenced
      operator()(const CommitLogFileInfo &x, const CommitLogFileInfo &y) const {

The next few are obvious.

/Users/m/work/hypertable/src/cc/Hypertable/Lib/MasterProtocol.cc(105):
warning #186: pointless comparison of unsigned integer with zero
      if (command < 0 || command >= COMMAND_MAX)


/Users/m/work/hypertable/src/cc/Hypertable/Lib/RangeServerProtocol.cc(53):
warning #186: pointless comparison of unsigned integer with zero
      if (command < 0 || command >= COMMAND_MAX)


/Users/m/work/hypertable/src/cc/DfsBroker/Lib/ConnectionHandler.cc(68):
warning #186: pointless comparison of unsigned integer with zero
        if (event->header.command < 0


And a representative of a small group of constant controlling
expression warnings is below:

/Users/m/work/hypertable/src/cc/Hypertable/RangeServer/AccessGroup.cc(197):
warning #279: controlling expression is constant
              assert("Should never be here!");

The one above should perhaps be changed to assert(!"Should never be here!");
At least few other asserts are used this way (with a ! prepended
before the string).

But the root cause of this warning is a constant expression which once
explicitly
casted to (bool) makes the warning vanish - but does not look too good
in the code.

Should we be worried about supporting Intel compiler ?

Mateusz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Hypertable Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hypertable-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to