GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Super Smack - Won't compile on g++ 4.1.2

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Super Smack - Won't compile on g++ 4.1.2

    Is Super Smack dead? Latest version on Tony Bourke's website is from 2005. On g++ 4.1.2, it errors on src/query.cc:

    query.cc: In member function ?void Query_report::fd_send(int)?:
    query.cc:200: error: cast from 'char*' to 'unsigned int' loses precision
    query.cc:200: error: cast from 'char*' to 'unsigned int' loses precision
    query.cc:219: error: cast from 'char*' to 'unsigned int' loses precision
    query.cc:219: error: cast from 'char*' to 'unsigned int' loses precision

    I know what the error is about, but I'm not sure the proper way to fix it.

  • #2
    I'm getting the same error. Guessing this tool is dead ( Anyone know any other good ones?

    Comment


    • #3
      I was able to make this work by hacking the file
      super-smack-1.3/src/query.cc

      Luckily no other file in the super smack source code had the same issue. I have also attached the file. Hope it helps.

      193c193
      < int len = 0, num_recs = 0;
      ---
      > long len = 0; int num_recs = 0;
      199,200c199,200
      < int str_len = (*i).first.length();
      < if((unsigned)p + str_len + 3 *sizeof(int) < (unsigned)p_end )
      ---
      > long str_len = (*i).first.length();
      > if((long)p + str_len + 3 *sizeof(int) < (long)p_end )
      219c219
      < len = (unsigned)p - (unsigned)buf;
      ---
      > len = (long)p - (long)buf;

      Comment

      Working...
      X