Browse Source

Fixed warning: implicit conversion loses integer precision: 'long' to 'int'

Sam Lantinga 1 month ago
parent
commit
965ac7f406
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/cpuinfo/SDL_cpuinfo.c

+ 2 - 2
src/cpuinfo/SDL_cpuinfo.c

@@ -1234,9 +1234,9 @@ int SDL_GetSystemPageSize(void)
 #if defined(HAVE_SYSCONF) && (defined(_SC_PAGESIZE) || defined(_SC_PAGE_SIZE))
         if (SDL_SystemPageSize <= 0) {
             #if defined(_SC_PAGE_SIZE)
-            SDL_SystemPageSize = sysconf(_SC_PAGE_SIZE);
+            SDL_SystemPageSize = (int)sysconf(_SC_PAGE_SIZE);
             #else
-            SDL_SystemPageSize = sysconf(_SC_PAGESIZE);
+            SDL_SystemPageSize = (int)sysconf(_SC_PAGESIZE);
             #endif
         }
 #endif