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

**URL:** <https://forums.percona.com/t/super-smack-wont-compile-on-g-4-1-2/720>\
**Category:** Other MySQL® Questions\
**Created:** [April 18, 2008, 9:00am UTC](https://forums.percona.com/t/super-smack-wont-compile-on-g-4-1-2/720 "2008-04-18T09:00:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![darlingm](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@darlingm](https://forums.percona.com/u/darlingm)\
**Post date:** [April 18, 2008, 9:00am UTC](https://forums.percona.com/t/super-smack-wont-compile-on-g-4-1-2/720/1 "2008-04-18T09:00:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dcampano](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/dcampano/32/779_2.png) [@dcampano](https://forums.percona.com/u/dcampano)\
**Post date:** [June 4, 2008, 7:11am UTC](https://forums.percona.com/t/super-smack-wont-compile-on-g-4-1-2/720/2 "2008-06-04T07:11:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sankalpm4](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sankalpm4](https://forums.percona.com/u/sankalpm4)\
**Post date:** [August 15, 2008, 3:09pm UTC](https://forums.percona.com/t/super-smack-wont-compile-on-g-4-1-2/720/3 "2008-08-15T15:09:19Z")

</div>

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;
