- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your function "__INLINE int Mul2_32s(int val)" (in the owng729.h file) has the following conditional statements:
line 490: if(val > 0x3fffffff)
and
line 493: if( val < 0xc0000000).
A gcc -Wall compile says "In function 'int Mul2_32s(int)': warning: comparison between signed and unsigned integer expressions", and a quick test shows that Mul2_32s( 6 ) is not 12: it is _MIN_INT, so i am changing the code to if( val < (int)0xc0000000) and if( val > (int)0x3fffffff ). Am i correct in stating that this was a bug? (a minor one, yes, i know, but still...)
Cristian.
line 490: if(val > 0x3fffffff)
and
line 493: if( val < 0xc0000000).
A gcc -Wall compile says "In function 'int Mul2_32s(int)': warning: comparison between signed and unsigned integer expressions", and a quick test shows that Mul2_32s( 6 ) is not 12: it is _MIN_INT, so i am changing the code to if( val < (int)0xc0000000) and if( val > (int)0x3fffffff ). Am i correct in stating that this was a bug? (a minor one, yes, i know, but still...)
Cristian.
Link Copied
0 Replies
![](/skins/images/872293744008A34B36F8ABF94A46CC66/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page