Project

General

Profile

Actions

Task #1347

closed

Fix warnings on Ubuntu 13.10 (gcc 4.8)

Added by Alex Afanasyev about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Low
Category:
Build
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

The following warnings are generated when compiling on Ubuntu 13.10 with gcc 4.8

../daemon/table/cs.cpp: In member function ‘std::pair<boost::shared_ptr<nfd::cs::Entry>, bool> nfd::Cs::insertToSkipList(const ndn::Data&, bool)’:
../daemon/table/cs.cpp:143:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (randomLayer > (m_skipList.size() - 1))
                                           ^
../daemon/table/cs.cpp:145:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       while ( (m_skipList.size() - 1) < randomLayer)
                                         ^
../daemon/table/cs.cpp: In member function ‘bool nfd::Cs::doesComplyWithSelectors(const ndn::Interest&, boost::shared_ptr<nfd::cs::Entry>) const’:
../daemon/table/cs.cpp:589:73: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           bool isSatisfied = minDataNameLength <= entry->getName().size();
                                                                         ^
../daemon/table/cs.cpp:601:73: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           bool isSatisfied = maxDataNameLength >= entry->getName().size();
                                                                         ^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-unused-private-field" [enabled by default]
Actions #1

Updated by Junxiao Shi about 10 years ago

-Wall -Werror should be added to compiler flags, so that Jenkins will reject any submissions that produces warnings.

Actions #2

Updated by Alex Afanasyev about 10 years ago

  • Status changed from New to Closed
  • Assignee set to Alex Afanasyev
  • Target version set to v0.1
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF