Re: Another hyperspace bug found --> random and Neural Net

Marcus Kool <marcus.kool-x/J+dzphU+SB39Oa/[email protected]>
Newsgroups gmane.mail.spam.crm114
Organization URLfilterDB
Message-ID <[email protected]>

Bill Yerazunis wrote:
>    From: Marcus Kool <marcus.kool-x/J+dzphU+SB39Oa/[email protected]>
> 
>    Moral of the story: do not mix types, they can cause a lot of headaches.
> 
> Therein lies the problem- for portability reasons (yes, I've been
> convinced by Ger and others) I'm trying to at least do _new_
> development using fixed-width types like uint32_t, rather than the
> ambiguous and platform-dependent types like "unsigned long".

Yep. when you want to start cleaning code this may happen.
I am a C programmer but never looked at the code of crm411, but
from my experience with other code you may need a day or so
to clean up the code.
You know the code much better and developed it on a 32bit system
so maybe you can simply substitute all occurrences of 'unsigned long'
by uint32_t.
If not, then go through all the source and do it manually.
E.g. in vi ":%s/unsigned long/uint32_t/gc  (the c at the end tells vi
to ask a confirmation for each substitution).

Marcus


> But - when I do that, I find that *none* of the calls pass unscathed
> through GCC.  Finding _real_ issues when flooded with meaningless,
> ignorable error messages is just bad practice.
> 
> 	  - Bill
> 
> 
>    Johannes Berg wrote:
>    > On Thu, 2008-06-19 at 08:31 -0400, Bill Yerazunis wrote:
>    >> Yep.  Here's another worm (unsightly and annoying)...
>    >>
>    >> Why is it that x86 GCC doesn't believe that "unsigned long" 
>    >> and "uint32_t" are the same type underneath?  
>    >>
>    >> Specifically, when doing an fprintf, I get annoying warnings
>    >> that there's a type mismatch.
>    >>
>    >> Is this me?  Is there a flag that says "Yo!  Be smart about
>    >> what a type is!" or some such like that?
>    > 
>    > It may be an artifact of the fact that "unsigned long" can be 64-bit
>    > when compiling for 64-bit platforms? (I'm not sure whether that is the
>    > case on x86 but it is on powerpc)
>    > 
>    > johannes
>    > 
>    > 
>    > ------------------------------------------------------------------------
>    > 
>    > -------------------------------------------------------------------------
>    > Check out the new SourceForge.net Marketplace.
>    > It's the best place to buy or sell services for
>    > just about anything Open Source.
>    > http://sourceforge.net/services/buy/index.php
>    > 
>    > 
>    > ------------------------------------------------------------------------
>    > 
>    > _______________________________________________
>    > Crm114-general mailing list
>    > [email protected]
>    > https://lists.sourceforge.net/lists/listinfo/crm114-general
> 
> 
> 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.