Code Monkey home page Code Monkey logo

minecraft-query-cpp's People

Contributors

erikvv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

minecraft-query-cpp's Issues

GCC Compiler Warnings

Hi,
cool & useful Code,
but some Compile Warnings on GCC via Linux with parameter -WALL

../MCQuery.cpp: In member function ‘void mcQuery::challengeReceiver(const boost::system::error_code&, size_t)’:
../MCQuery.cpp:96:68: warning: missing braces around initializer for ‘std::array<unsigned char, 5ul>::value_type [5] {aka unsigned char [5]}’ [-Wmissing-braces]
../MCQuery.cpp: In member function ‘void mcQuery::dataReceiver(const boost::system::error_code&, size_t)’:
../MCQuery.cpp:128:68: warning: missing braces around initializer for ‘std::array<unsigned char, 5ul>::value_type [5] {aka unsigned char [5]}’ [-Wmissing-braces]
../MCQuery.cpp: In member function ‘void mcQuerySimple::receiver(const boost::system::error_code&, size_t)’:
../MCQuery.cpp:291:44: warning: missing braces around initializer for ‘std::array<unsigned char, 2ul>::value_type [2] {aka unsigned char [2]}’ [-Wmissing-braces]
../MCQuery.cpp:296:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

There are just some braces missing, so here are the lines & the code which are fixed:
Line 96:

const array<uchar,5> expected = {{ 0x09, 0x01, 0x02, 0x03, 0x04 }};
Line 128:
const array<uchar,5> expected = {{ 0x00, 0x01, 0x02, 0x03, 0x04 }};
Line 291:
array<uchar,2> expected = {{ 0xFF, 0x00 }};

Also on Line 296, the compiler doesn't like the comparison between unsigned and signed. So:

for( unsigned int i=0; i<recvBuffer.size()/2; i++) {

Best regards, Sapd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.