Commit 8af9c18f authored by Lynn Garren's avatar Lynn Garren
Browse files

avoid comparing signed and unsigned integers

parent fcf5fb45
...@@ -184,8 +184,8 @@ rng_state_t* rng_copy(myuint *Y) ...@@ -184,8 +184,8 @@ rng_state_t* rng_copy(myuint *Y)
void seed_vielbein(rng_state_t* X, unsigned int index) void seed_vielbein(rng_state_t* X, unsigned int index)
{ {
int i; int i;
if (index<N){ if ((int)index<N){
for (i=0; i < N; i++){ for (i=0; i < N; i++){
X->V[i] = 0; X->V[i] = 0;
} }
...@@ -315,7 +315,7 @@ void read_state(rng_state_t* X, const char filename[] ){ ...@@ -315,7 +315,7 @@ void read_state(rng_state_t* X, const char filename[] ){
unsigned int counter; unsigned int counter;
if (!fscanf( fin, "}; counter=%u; ", &counter)){fprintf(stderr, "mixmax -> read_state: error reading counter from file %s\n", filename); exit(ERROR_READING_STATE_FILE);} if (!fscanf( fin, "}; counter=%u; ", &counter)){fprintf(stderr, "mixmax -> read_state: error reading counter from file %s\n", filename); exit(ERROR_READING_STATE_FILE);}
if( counter <= N ) { if( (int)counter <= N ) {
X->counter= counter; X->counter= counter;
}else{ }else{
fprintf(stderr, "mixmax -> read_state: Invalid counter = %d" fprintf(stderr, "mixmax -> read_state: Invalid counter = %d"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment