Re: turning Marsaglia's recent posts into a function
- From: Uno <merrilljensen@xxxxx>
- Date: Wed, 01 Sep 2010 17:08:22 -0600
Ian Collins wrote:
On 09/ 1/10 12:42 PM, Uno wrote:
$ gcc -Wall -Wextra geo1.c -o out
geo1.c: In function ‘MWC’:
geo1.c:5: warning: type defaults to ‘int’ in declaration of ‘c’
geo1.c:5: warning: type defaults to ‘int’ in declaration of ‘j’
geo1.c:5: warning: unused variable ‘i’
geo1.c: In function ‘main’:
geo1.c:21: warning: format ‘%22u’ expects type ‘unsigned int’, but
argument 2 has type ‘long unsigned int’
geo1.c:23: warning: format ‘%22u’ expects type ‘unsigned int’, but
argument 2 has type ‘long unsigned int’
geo1.c:24: warning: control reaches end of non-void function
A list of compiler warnings for some truly awful code.
These things look very fixable to me. George is 86, so he remembers a more traditional C and has forgotten more about making random numbers than we'll ever know.
I don't think he reads clc, but do you think your tone appropriate?
--
Uno
.
- Follow-Ups:
- Re: turning Marsaglia's recent posts into a function
- From: Ian Collins
- Re: turning Marsaglia's recent posts into a function
- References:
- Re: turning Marsaglia's recent posts into a function
- From: Ian Collins
- Re: turning Marsaglia's recent posts into a function
- Prev by Date: Re: Three stupid C questions
- Next by Date: Re: Three stupid C questions
- Previous by thread: Re: turning Marsaglia's recent posts into a function
- Next by thread: Re: turning Marsaglia's recent posts into a function
- Index(es):
Relevant Pages
|