Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Ok, added long casts to get rid of compiler warnings.

  • Loading branch information
pendletonrc committed Sep 28, 2009
1 parent 761bf14 commit 9a4718b6b99785c109d3bdf85d93301223c3cd8a
Showing with 11 additions and 11 deletions.
  1. +11 −11 test/testatomic.c
@@ -80,36 +80,36 @@ main(int argc, char *argv[])

val64 = 0;
tfret = SDL_AtomicTestThenSet64(&val64);
printf("TestThenSet64 tfret=%s val=%lld\n", tf(tfret), val64);
printf("TestThenSet64 tfret=%s val=%llu\n", tf(tfret), ((unsigned long long)val64));
tfret = SDL_AtomicTestThenSet64(&val64);
printf("TestThenSet64 tfret=%s val=%lld\n", tf(tfret), val64);
printf("TestThenSet64 tfret=%s val=%llu\n", tf(tfret), ((unsigned long long)val64));

SDL_AtomicClear64(&val64);
printf("Clear64 val=%lld\n", val64);
printf("Clear64 val=%llu\n", ((unsigned long long)val64));

ret64 = SDL_AtomicFetchThenIncrement64(&val64);
printf("FetchThenIncrement64 ret=%lld val=%lld\n", ret64, val64);
printf("FetchThenIncrement64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));

ret64 = SDL_AtomicFetchThenDecrement64(&val64);
printf("FetchThenDecrement64 ret=%lld val=%lld\n", ret64, val64);
printf("FetchThenDecrement64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));

ret64 = SDL_AtomicFetchThenAdd64(&val64, 10);
printf("FetchThenAdd64 ret=%lld val=%lld\n", ret64, val64);
printf("FetchThenAdd64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));

ret64 = SDL_AtomicFetchThenSubtract64(&val64, 10);
printf("FetchThenSubtract64 ret=%lld val=%lld\n", ret64, val64);
printf("FetchThenSubtract64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));

ret64 = SDL_AtomicIncrementThenFetch64(&val64);
printf("IncrementThenFetch64 ret=%lld val=%lld\n", ret64, val64);
printf("IncrementThenFetch64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));

ret64 = SDL_AtomicDecrementThenFetch64(&val64);
printf("DecrementThenFetch64 ret=%lld val=%lld\n", ret64, val64);
printf("DecrementThenFetch64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));

ret64 = SDL_AtomicAddThenFetch64(&val64, 10);
printf("AddThenFetch64 ret=%lld val=%lld\n", ret64, val64);
printf("AddThenFetch64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));

ret64 = SDL_AtomicSubtractThenFetch64(&val64, 10);
printf("SubtractThenFetch64 ret=%lld val=%lld\n", ret64, val64);
printf("SubtractThenFetch64 ret=%llu val=%llu\n", ((unsigned long long)ret64), ((unsigned long long)val64));
#endif

return 0;

0 comments on commit 9a4718b

Please sign in to comment.