Loading

Paste #plr4ntcbt

  1. Index: config.lib
  2. ===================================================================
  3. --- config.lib  (revision 27708)
  4. +++ config.lib  (working copy)
  5. @@ -1404,6 +1404,9 @@
  6.             # warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
  7.             # They are valid according to the C++ standard, but useless.
  8.             cxxflags="$cxxflags -Wno-narrowing"
  9. +       fi
  10. +
  11. +       if [ $cc_version -ge 407 ]; then
  12.             # Disable bogus 'attempt to free a non-heap object' warning
  13.             flags="$flags -Wno-free-nonheap-object"
  14.         fi
  15. Index: src/saveload/saveload.cpp
  16. ===================================================================
  17. --- src/saveload/saveload.cpp   (revision 27708)
  18. +++ src/saveload/saveload.cpp   (working copy)
  19. @@ -1484,6 +1484,8 @@
  20.     return 0;
  21.  }
  22.  
  23. +#ifdef OTTD_ASSERT
  24. +
  25.  /**
  26.   * Check whether the variable size of the variable in the saveload configuration
  27.   * matches with the actual variable size.
  28. @@ -1524,9 +1526,13 @@
  29.     }
  30.  }
  31.  
  32. +#endif /* OTTD_ASSERT */
  33. +
  34.  bool SlObjectMember(void *ptr, const SaveLoad *sld)
  35.  {
  36. +#ifdef OTTD_ASSERT
  37.     assert(IsVariableSizeRight(sld));
  38. +#endif
  39.  
  40.     VarType conv = GB(sld->conv, 0, 8);
  41.     switch (sld->cmd) {
  42.  

Comments