Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile warnings for some large file tests. #695

Closed
edhartnett opened this issue Nov 26, 2017 · 0 comments · Fixed by #680
Closed

Compile warnings for some large file tests. #695

edhartnett opened this issue Nov 26, 2017 · 0 comments · Fixed by #680

Comments

@edhartnett
Copy link
Contributor

With large file testing turned on, I see these warings:

../../../nc_test/tst_big_var6.c:88:37: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
      printf("error on start[0..2]: %d,%d,%d  j: %d, expected %d got %d\n",
                                    ~^
                                    %ld
      start[0], start[1], start[2], j, FIRST_VAL, data[j]);
      ~~~~~~~~                        
../../../nc_test/tst_big_var6.c:88:40: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
      printf("error on start[0..2]: %d,%d,%d  j: %d, expected %d got %d\n",
                                       ~^
                                       %ld
      start[0], start[1], start[2], j, FIRST_VAL, data[j]);
                ~~~~~~~~                 
../../../nc_test/tst_big_var6.c:88:43: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
      printf("error on start[0..2]: %d,%d,%d  j: %d, expected %d got %d\n",
                                          ~^
                                          %ld
      start[0], start[1], start[2], j, FIRST_VAL, data[j]);
                          ~~~~~~~~          
../../../nc_test/tst_big_var6.c:52:15: warning: unused variable ‘k’ [-Wunused-variable]
     int i, j, k;
               ^
../../../nc_test/tst_big_var6.c:52:9: warning: unused variable ‘i’ [-Wunused-variable]
     int i, j, k;
         ^
../../../nc_test/tst_big_var2.c: In function ‘test_big_var’:
../../../nc_test/tst_big_var2.c:95:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
   printf("error on start[0]: %d i: %d j: %d expected %d got %d\n",
                              ~^
                              %ld
          start[0], i, j, 42, data[i][j]);
          ~~~~~~~~              
../../../nc_test/tst_big_var2.c:109:36: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
        printf("error on start[0]: %d i: %d j: %d expected %d got %d\n",
                                   ~^
                                   %ld
        start[0], i, j, 19, data[i][j]);
        ~~~~~~~~                     
../../../nc_test/tst_big_var2.c:50:9: warning: unused variable ‘nval_in’ [-Wunused-variable]
     int nval_in;
         ^~~~~~~
../../../nc_test/tst_big_var2.c:49:9: warning: unused variable ‘nval’ [-Wunused-variable]
     int nval = 99;
         ^~~~
../../../nc_test/tst_big_var2.c:48:12: warning: unused variable ‘index’ [-Wunused-variable]
     size_t index[NUMDIMS];
            ^~~~~

All easy to fix. I will put fixes in my current open PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant