122
122
 
{
123
123
 
    hsize_t acc = 0;
124
124
 
    int     overlap = 1;
125
125
 
    int     i;
126
126
 
    int     tries = 0;
127
127
 
128
128
 
    /* Generate up to MAX_TRIES random numbers until one of them */
129
129
 
    /* does not overlap with any previous writes */
130
130
 
    while(overlap != 0 && tries < MAX_TRIES)
131
131
 
    {
132
 
-
        acc = HDrandom();
133
 
-
        acc *= HDrandom();
 
132
+
        acc = (hsize_t)HDrandom();
 
133
+
        acc *= (hsize_t)HDrandom();
134
134
 
        acc = acc % limit;
135
135
 
        overlap = 0;
136
136
 
137
137
 
        for(i = 0; i < current_index; i++)
138
138
 
        {
139
139
 
            if((acc >= values_used[i]) && (acc < values_used[i]+WRT_SIZE))
140
140
 
                overlap = 1;
141
141
 
            if((acc+WRT_SIZE >= values_used[i]) && (acc+WRT_SIZE < values_used[i]+WRT_SIZE))
142
142
 
                overlap = 1;
143
143
 
        }
Show more
501
501
 
    if((fspace = H5Dget_space(d2)) < 0) FAIL_STACK_ERROR
502
502
 
503
503
 
    /* Describe `buf' */
504
504
 
    if((mspace = H5Screate_simple(1, hs_size, hs_size)) < 0) FAIL_STACK_ERROR
505
505
 
506
506
 
    /* Read each region */
507
507
 
    while(HDfgets(ln, (int)sizeof(ln), script)) {
508
508
 
        if('#' != ln[0])
509
509
 
            break;
510
510
 
        i = (int)HDstrtol(ln + 1, &s, 10);
511
 
-
        hs_offset[0] = HDstrtoll(s, NULL, 0);
 
511
+
        hs_offset[0] = HDstrtoull(s, NULL, 0);
512
512
 
        HDfprintf(stdout, "#%03d 0x%016Hx%47s", i, hs_offset[0], "");
513
513
 
        HDfflush(stdout);
514
514
 
515
515
 
        if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL,
516
516
 
                hs_size, NULL) < 0) FAIL_STACK_ERROR
517
517
 
                if(H5Dread(d2, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, buf) < 0)
518
518
 
                    FAIL_STACK_ERROR
519
519
 
520
520
 
                    /* Check */
521
521
 
                    for(j = zero = wrong = 0; j < WRT_SIZE; j++) {
Show more
794
794
 
    /* check sparse file support unless cflag is not set. */
795
795
 
    if(cflag)
796
796
 
        sparse_support = is_sparse();
797
797
 
798
798
 
    /* Choose random # seed */
799
799
 
    seed = (unsigned long)HDtime(NULL);
800
800
 
#ifdef QAK
801
801
 
    /* seed = (unsigned long)1155438845; */
802
802
 
    HDfprintf(stderr, "Random # seed was: %lu\n", seed);
803
803
 
#endif /* QAK */
804
 
-
    HDsrandom(seed);
 
804
+
    HDsrandom((unsigned)seed);
805
805
 
806
806
 
    /* run VFD-specific test */
807
807
 
    if(H5FD_SEC2 == driver) {
808
808
 
        if(test_sec2(fapl) != 0)
809
809
 
            goto error;
810
810
 
    }
811
811
 
    else if(H5FD_STDIO == driver) {
812
812
 
        if(test_stdio(fapl) != 0)
813
813
 
            goto error;
814
814
 
    }