test/testatomic.c
changeset 3325 bb9c3d04f126
parent 3299 975fd903466b
child 3327 35387815b155
     1.1 --- a/test/testatomic.c	Mon Sep 28 15:32:58 2009 +0000
     1.2 +++ b/test/testatomic.c	Mon Sep 28 18:44:26 2009 +0000
     1.3 @@ -80,36 +80,36 @@
     1.4  
     1.5     val64 = 0;
     1.6     tfret = SDL_AtomicTestThenSet64(&val64);
     1.7 -   printf("TestThenSet64        tfret=%s val=%lld\n", tf(tfret), val64);
     1.8 +   printf("TestThenSet64        tfret=%s val=%llu\n", tf(tfret), ((unsigned long long)val64));
     1.9     tfret = SDL_AtomicTestThenSet64(&val64);
    1.10 -   printf("TestThenSet64        tfret=%s val=%lld\n", tf(tfret), val64);
    1.11 +   printf("TestThenSet64        tfret=%s val=%llu\n", tf(tfret), ((unsigned long long)val64));
    1.12  
    1.13     SDL_AtomicClear64(&val64);
    1.14 -   printf("Clear64              val=%lld\n", val64);
    1.15 +   printf("Clear64              val=%llu\n", ((unsigned long long)val64));
    1.16  
    1.17     ret64 = SDL_AtomicFetchThenIncrement64(&val64);
    1.18 -   printf("FetchThenIncrement64 ret=%lld val=%lld\n", ret64, val64);
    1.19 +   printf("FetchThenIncrement64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));
    1.20  
    1.21     ret64 = SDL_AtomicFetchThenDecrement64(&val64);
    1.22 -   printf("FetchThenDecrement64 ret=%lld val=%lld\n", ret64, val64);
    1.23 +   printf("FetchThenDecrement64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));
    1.24  
    1.25     ret64 = SDL_AtomicFetchThenAdd64(&val64, 10);
    1.26 -   printf("FetchThenAdd64       ret=%lld val=%lld\n", ret64, val64);
    1.27 +   printf("FetchThenAdd64       ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));
    1.28  
    1.29     ret64 = SDL_AtomicFetchThenSubtract64(&val64, 10);
    1.30 -   printf("FetchThenSubtract64  ret=%lld val=%lld\n", ret64, val64);
    1.31 +   printf("FetchThenSubtract64  ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));
    1.32  
    1.33     ret64 = SDL_AtomicIncrementThenFetch64(&val64);
    1.34 -   printf("IncrementThenFetch64 ret=%lld val=%lld\n", ret64, val64);
    1.35 +   printf("IncrementThenFetch64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));
    1.36  
    1.37     ret64 = SDL_AtomicDecrementThenFetch64(&val64);
    1.38 -   printf("DecrementThenFetch64 ret=%lld val=%lld\n", ret64, val64);
    1.39 +   printf("DecrementThenFetch64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));
    1.40  
    1.41     ret64 = SDL_AtomicAddThenFetch64(&val64, 10);
    1.42 -   printf("AddThenFetch64       ret=%lld val=%lld\n", ret64, val64);
    1.43 +   printf("AddThenFetch64       ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));
    1.44  
    1.45     ret64 = SDL_AtomicSubtractThenFetch64(&val64, 10);
    1.46 -   printf("SubtractThenFetch64  ret=%lld val=%lld\n", ret64, val64);
    1.47 +   printf("SubtractThenFetch64  ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));
    1.48  #endif
    1.49  
    1.50     return 0;