Skip to content
  • Tobias Klauser's avatar
    df00d029
    selftests/vDSO: fix -Wformat warning in vdso_test_correctness · df00d029
    Tobias Klauser authored
    
    
    Fix the following -Wformat warnings in vdso_test_correctness.c:
    
    vdso_test_correctness.c: In function ‘test_one_clock_gettime64’:
    vdso_test_correctness.c:352:21: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat=]
      352 |  printf("\t%llu.%09ld %llu.%09ld %llu.%09ld\n",
          |                 ~~~~^
          |                     |
          |                     long int
          |                 %09lld
      353 |         (unsigned long long)start.tv_sec, start.tv_nsec,
          |                                           ~~~~~~~~~~~~~
          |                                                |
          |                                                long long int
    vdso_test_correctness.c:352:32: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=]
      352 |  printf("\t%llu.%09ld %llu.%09ld %llu.%09ld\n",
          |                            ~~~~^
          |                                |
          |                                long int
          |                            %09lld
      353 |         (unsigned long long)start.tv_sec, start.tv_nsec,
      354 |         (unsigned long long)vdso.tv_sec, vdso.tv_nsec,
          |                                          ~~~~~~~~~~~~
          |                                              |
          |                                              long long int
    vdso_test_correctness.c:352:43: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=]
    
    The tv_sec member of __kernel_timespec is long long, both in
    uapi/linux/time_types.h and locally in vdso_test_correctness.c.
    
    Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
    Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
    df00d029
    selftests/vDSO: fix -Wformat warning in vdso_test_correctness
    Tobias Klauser authored
    
    
    Fix the following -Wformat warnings in vdso_test_correctness.c:
    
    vdso_test_correctness.c: In function ‘test_one_clock_gettime64’:
    vdso_test_correctness.c:352:21: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat=]
      352 |  printf("\t%llu.%09ld %llu.%09ld %llu.%09ld\n",
          |                 ~~~~^
          |                     |
          |                     long int
          |                 %09lld
      353 |         (unsigned long long)start.tv_sec, start.tv_nsec,
          |                                           ~~~~~~~~~~~~~
          |                                                |
          |                                                long long int
    vdso_test_correctness.c:352:32: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=]
      352 |  printf("\t%llu.%09ld %llu.%09ld %llu.%09ld\n",
          |                            ~~~~^
          |                                |
          |                                long int
          |                            %09lld
      353 |         (unsigned long long)start.tv_sec, start.tv_nsec,
      354 |         (unsigned long long)vdso.tv_sec, vdso.tv_nsec,
          |                                          ~~~~~~~~~~~~
          |                                              |
          |                                              long long int
    vdso_test_correctness.c:352:43: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=]
    
    The tv_sec member of __kernel_timespec is long long, both in
    uapi/linux/time_types.h and locally in vdso_test_correctness.c.
    
    Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
    Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Loading