Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation warnings not reported by CI jobs #29033

Closed
2 tasks done
akien-mga opened this issue May 20, 2019 · 6 comments
Closed
2 tasks done

Compilation warnings not reported by CI jobs #29033

akien-mga opened this issue May 20, 2019 · 6 comments
Assignees
Milestone

Comments

@akien-mga
Copy link
Member

akien-mga commented May 20, 2019

Godot version:
9e214ad

OS/device including version:
Various

Issue description:
We only test a limited number of build configurations on Travis and AppVeyor, and only some of those jobs treat warnings as errors, so there are still some warnings produced by some specific configurations which need to be handled. They should be listed in this issue.

🔸 Emscripten 1.38.30, javascript build:
  • p=javascript tools=yes in platform/javascript/audio_driver_javascript.cpp
platform/javascript/audio_driver_javascript.cpp:102:54: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
        if (!internal_buffer || memarr_len(internal_buffer) != buffer_length * channel_count) {
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • p=javascript tools=yes in modules/webrtc/webrtc_peer_js.cpp
modules/webrtc/webrtc_peer_js.cpp:191:29: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
        if (in_buffer.space_left() < p_size + 5) {
            ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
  • more to come
@akien-mga akien-mga added this to the 3.2 milestone May 20, 2019
@bruvzg
Copy link
Member

bruvzg commented May 20, 2019

Here're warnings I'm getting with 5cc1c7d. Most of these already were reported in various issues.

🔸 Xcode 10.2.1, macOS build:
scene/2d/position_2d.h:40:36: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
        const float DEFAULT_GIZMO_EXTENTS = 10.0;
  • p=osx tools=yes in scene/resources/texture.h
scene/resources/texture.h:91:1: warning: class 'BitMap' was previously declared as a struct [-Wmismatched-tags]
class BitMap;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h:61:8: note:
      previous use is here
struct BitMap {
       ^
scene/resources/texture.h:91:1: note: did you mean struct here?
class BitMap;
^~~~~
struct
  • p=osx tools=yes in modules/assimp/editor_scene_importer_assimp.cpp
modules/assimp/editor_scene_importer_assimp.cpp:858:10: warning: comparison of array 'map_mode' not equal to a null pointer is always true [-Wtautological-pointer-compare]
                                        if (map_mode != NULL) {
                                            ^~~~~~~~    ~~~~
  • p=osx tools=yes in thirdparty/bullet/LinearMath/btVector3.h
thirdparty/bullet/LinearMath/btVector3.h:335:7: warning: argument value 10880 is outside the valid range [0, 255] [-Wargument-outside-range]
                y = bt_splat_ps(y, 0x80);
                    ^~~~~~~~~~~~~~~~~~~~
thirdparty/bullet/LinearMath/btVector3.h:43:29: note: expanded from macro 'bt_splat_ps'
#define bt_splat_ps(_a, _i) bt_pshufd_ps((_a), BT_SHUFFLE(_i, _i, _i, _i))
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thirdparty/bullet/LinearMath/btVector3.h:41:33: note: expanded from macro 'bt_pshufd_ps'
#define bt_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include/xmmintrin.h:2608:11: note: expanded from macro '_mm_shuffle_ps'
  (__m128)__builtin_ia32_shufps((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), \
          ^
  • p=osx tools=yes in thirdparty/bullet/LinearMath/btMatrix3x3.h
thirdparty/bullet/LinearMath/btMatrix3x3.h:910:14: warning: argument value 10880 is outside the valid range [0, 255] [-Wargument-outside-range]
        __m128 vk = bt_splat_ps(_mm_load_ss((float*)&k), 0x80);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thirdparty/bullet/LinearMath/btVector3.h:43:29: note: expanded from macro 'bt_splat_ps'
#define bt_splat_ps(_a, _i) bt_pshufd_ps((_a), BT_SHUFFLE(_i, _i, _i, _i))
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thirdparty/bullet/LinearMath/btVector3.h:41:33: note: expanded from macro 'bt_pshufd_ps'
#define bt_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include/xmmintrin.h:2608:11: note: expanded from macro '_mm_shuffle_ps'
  (__m128)__builtin_ia32_shufps((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), \
          ^
  • p=osx tools=yes in drivers/unix/semaphore_posix.cpp
drivers/unix/semaphore_posix.cpp:60:2: warning: 'sem_getvalue' is deprecated [-Wdeprecated-declarations]
        sem_getvalue(&sem, &val);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/semaphore.h:54:56: note: 'sem_getvalue' has been explicitly
      marked deprecated here
int sem_getvalue(sem_t * __restrict, int * __restrict) __deprecated;
                                                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/cdefs.h:176:40: note: expanded from macro '__deprecated'
#define __deprecated    __attribute__((deprecated))
                                       ^
drivers/unix/semaphore_posix.cpp:77:10: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
        int r = sem_init(&sem, 0, 0);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/semaphore.h:55:42: note: 'sem_init' has been explicitly
      marked deprecated here
int sem_init(sem_t *, int, unsigned int) __deprecated;
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/cdefs.h:176:40: note: expanded from macro '__deprecated'
#define __deprecated    __attribute__((deprecated))
                                       ^
drivers/unix/semaphore_posix.cpp:84:2: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations]
        sem_destroy(&sem);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/semaphore.h:53:26: note: 'sem_destroy' has been explicitly
      marked deprecated here
int sem_destroy(sem_t *) __deprecated;
                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/cdefs.h:176:40: note: expanded from macro '__deprecated'
#define __deprecated    __attribute__((deprecated))
                                       ^
🔸 Xcode 10.2.1, iOS build:
  • p=iphone tools=no in platform/iphone/gl_view.h
platform/iphone/gl_view.h:83:30: warning: 'MPMoviePlayerController' is deprecated: first deprecated in iOS 9.0 - Use AVPlayerViewController in AVKit. [-Wdeprecated-declarations,30]
 @property(strong, nonatomic) MPMoviePlayerController *moviePlayerController;
                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMoviePlayerController.h:83:12: note: 'MPMoviePlayerController' has been explicitly marked deprecated here [2]
 @interface MPMoviePlayerController : NSObject <MPMediaPlayback>
            ^
platform/iphone/gl_view.h:108:26: note: setter and getter must both be synthesized, or both be user defined,or the property must be nonatomic [2]
 @property NSTimeInterval animationInterval;
                          ^
           (nonatomic)
fix-it:"platform/iphone/gl_view.h":{108:11-108:11}:"(nonatomic) "
platform/iphone/gl_view.h:108:26: note: property declared here [2]
  • p=iphone tools=no in platform/iphone/main.m
platform/iphone/main.m:45:15: warning: unused variable 'app' [-Wunused-variable,35]
        AppDelegate *app = [AppDelegate alloc];
                      ^
  • p=iphone tools=no in platform/iphone/gl_view.mm
platform/iphone/gl_view.mm:84:23:{84:23-84:38}: warning: 'safeAreaInsets' is only available on iOS 11.0 or newer [-Wunguarded-availability-new,2]
                insets = [_instance safeAreaInsets];
                                     ^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:264:45: note: 'safeAreaInsets' has been marked as being introduced in iOS 11.0 here, but the deployment target is iOS 10.0.0 [2]
 @property (nonatomic,readonly) UIEdgeInsets safeAreaInsets API_AVAILABLE(ios(11.0),tvos(11.0));
                                             ^
platform/iphone/gl_view.mm:84:23:{84:23-84:38}: note: enclose 'safeAreaInsets' in an @available check to silence this warning [2]
                insets = [_instance safeAreaInsets];
                                     ^~~~~~~~~~~~~~~
fix-it:"platform/iphone/gl_view.mm":{84:3-84:3}:"if (@available(iOS 11.0, *)) {\n\t\t    "
fix-it:"platform/iphone/gl_view.mm":{84:39-84:39}:"\n\t\t} else {\n\t\t    // Fallback on earlier versions\n\t\t}"
platform/iphone/gl_view.mm:417:16: warning: 'setFrameInterval:' is deprecated: first deprecated in iOS 10.0 - preferredFramesPerSecond [-Wdeprecated-declarations,30]
                [displayLink setFrameInterval:frameInterval];
                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h:71:32: note: property 'frameInterval' is declared deprecated here [2]
 @property(nonatomic) NSInteger frameInterval
                                ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h:71:32: note: 'setFrameInterval:' has been explicitly marked deprecated here [2]
platform/iphone/gl_view.mm:451:1: warning: writable atomic property 'animationInterval' cannot pair a synthesized getter with a user defined setter [-Watomic-property-with-user-defined-accessor,2]
 - (void)setAnimationInterval:(NSTimeInterval)interval {
 ^
  • p=iphone tools=no in platform/iphone/in_app_store.mm
platform/iphone/in_app_store.mm:209:29: warning: 'transactionReceipt' is deprecated: first deprecated in iOS 7.0 - Use -[NSBundle appStoreReceiptURL] [-Wdeprecated-declarations,30]
                                                receipt = transaction.transactionReceipt;
                                                                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/StoreKit.framework/Headers/SKPaymentTransaction.h:47:50: note: 'transactionReceipt' has been explicitly marked deprecated here [2]
 @property(nonatomic, readonly, nullable) NSData *transactionReceipt NS_DEPRECATED_IOS(3_0, 7_0, "Use -[NSBundle appStoreReceiptURL]");
                                                  ^
platform/iphone/in_app_store.mm:213:28: warning: 'transactionReceipt' is deprecated: first deprecated in iOS 7.0 - Use -[NSBundle appStoreReceiptURL] [-Wdeprecated-declarations,30]
                                        receipt = transaction.transactionReceipt;
                                                               ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/StoreKit.framework/Headers/SKPaymentTransaction.h:47:50: note: 'transactionReceipt' has been explicitly marked deprecated here [2]
 @property(nonatomic, readonly, nullable) NSData *transactionReceipt NS_DEPRECATED_IOS(3_0, 7_0, "Use -[NSBundle appStoreReceiptURL]");
                                                  ^
platform/iphone/in_app_store.mm:276:34: warning: 'paymentWithProductIdentifier:' is deprecated: first deprecated in iOS 5.0 - Use +paymentWithProduct: after fetching the available products using SKProductsRequest [-Wdeprecated-declarations,30]
        SKPayment *payment = [SKPayment paymentWithProductIdentifier:pid];
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/StoreKit.framework/Headers/SKPayment.h:23:1: note: 'paymentWithProductIdentifier:' has been explicitly marked deprecated here [2]
 + (id)paymentWithProductIdentifier:(NSString *)identifier NS_DEPRECATED_IOS(3_0, 5_0, "Use +paymentWithProduct: after fetching the available products using SKProductsRequest");
 ^
  • p=iphone tools=no in platform/iphone/view_controller.mm
platform/iphone/view_controller.mm:46:21: warning: conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings,30]
        p_args[p_argc++] = "--path";
                            ^
platform/iphone/view_controller.mm:48:34: warning: 'cString' is deprecated: first deprecated in iOS 2.0 - Use -cStringUsingEncoding: instead [-Wdeprecated-declarations,30]
        p_args[p_argc++] = (char *)[str cString];
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:501:1: note: 'cString' has been explicitly marked deprecated here [2]
 - (nullable const char *)cString NS_RETURNS_INNER_POINTER API_DEPRECATED("Use -cStringUsingEncoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
 ^
platform/iphone/view_controller.mm:66:35: warning: 'cString' is deprecated: first deprecated in iOS 2.0 - Use -cStringUsingEncoding: instead [-Wdeprecated-declarations,30]
                p_args[p_argc++] = (char *)[str cString];
                                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:501:1: note: 'cString' has been explicitly marked deprecated here [2]
 - (nullable const char *)cString NS_RETURNS_INNER_POINTER API_DEPRECATED("Use -cStringUsingEncoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
 ^
platform/iphone/view_controller.mm:79:17: warning: method definition for 'shouldAutorotateToInterfaceOrientation:' not found [-Wincomplete-implementation,2]
 @implementation ViewController
                 ^
platform/iphone/view_controller.h:37:1: note: method 'shouldAutorotateToInterfaceOrientation:' declared here [2]
 - (BOOL)shouldAutorotateToInterfaceOrientation:
 ^
  • p=iphone tools=no in platform/iphone/app_delegate.mm
platform/iphone/app_delegate.mm:55:37: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 - Please use openURL:options:completionHandler: instead [-Wdeprecated-declarations,30]
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
                                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:128:1: note: 'openURL:' has been explicitly marked deprecated here [2]
 - (BOOL)openURL:(NSURL*)url NS_DEPRECATED_IOS(2_0, 10_0, "Please use openURL:options:completionHandler: instead") NS_EXTENSION_UNAVAILABLE_IOS("");
 ^
platform/iphone/app_delegate.mm:450:14: warning: '__bridge_transfer' casts have no effect when not using ARC [-Warc-bridge-casts-disallowed-in-nonarc,8]
                                        uuid = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, cfuuid);
                                                 ^~~~~~~~~~~~~~~~~~
fix-it:"platform/iphone/app_delegate.mm":{450:14-450:32}:""
platform/iphone/app_delegate.mm:593:10: warning: unused variable 'quit_request' [-Wunused-variable,35]
                                bool quit_request = OSIPhone::get_singleton()->iterate();
                                      ^
platform/iphone/app_delegate.mm:612:15: warning: 'setStatusBarHidden:withAnimation:' is deprecated: first deprecated in iOS 9.0 - Use -[UIViewController prefersStatusBarHidden] [-Wdeprecated-declarations,30]
        [application setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:464:1: note: 'setStatusBarHidden:withAnimation:' has been explicitly marked deprecated here [2]
 - (void)setStatusBarHidden:(BOOL)hidden withAnimation:(UIStatusBarAnimation)animation NS_DEPRECATED_IOS(3_2, 9_0, "Use -[UIViewController prefersStatusBarHidden]") __TVOS_PROHIBITED;
 ^
platform/iphone/app_delegate.mm:150:25:{150:4-150:24}: warning: 'UIView' may not respond to 'stopAnimation' [2]
                [view_controller.view stopAnimation];
                  ~~~~~~~~~~~~~~~~~~~~ ^
platform/iphone/app_delegate.mm:168:25:{168:4-168:24}: warning: 'UIView' may not respond to 'startAnimation' [2]
                [view_controller.view startAnimation];
                  ~~~~~~~~~~~~~~~~~~~~ ^
  • p=iphone tools=no in platform/iphone/ios.mm
platform/iphone/ios.mm:41:2: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations,30]
        UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:p_title] message:[NSString stringWithUTF8String:p_alert] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] autorelease];
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here [2]
 @interface UIAlertView : UIView
            ^
platform/iphone/ios.mm:41:26: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations,30]
        UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:p_title] message:[NSString stringWithUTF8String:p_alert] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] autorelease];
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here [2]
 @interface UIAlertView : UIView
            ^
  • p=iphone tools=no in drivers/unix/semaphore_posix.cpp (same as on macOS)
drivers/unix/semaphore_posix.cpp:60:2: warning: 'sem_getvalue' is deprecated [-Wdeprecated-declarations,30]
        sem_getvalue(&sem, &val);
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/semaphore.h:54:56: note: 'sem_getvalue' has been explicitly marked deprecated here [2]
 int sem_getvalue(sem_t * __restrict, int * __restrict) __deprecated;
                                                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/cdefs.h:176:40: note: expanded from macro '__deprecated'
 #define __deprecated    __attribute__((deprecated))
                                        ^
drivers/unix/semaphore_posix.cpp:77:10: warning: 'sem_init' is deprecated [-Wdeprecated-declarations,30]
        int r = sem_init(&sem, 0, 0);
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/semaphore.h:55:42: note: 'sem_init' has been explicitly marked deprecated here [2]
 int sem_init(sem_t *, int, unsigned int) __deprecated;
                                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/cdefs.h:176:40: note: expanded from macro '__deprecated'
 #define __deprecated    __attribute__((deprecated))
                                        ^
drivers/unix/semaphore_posix.cpp:84:2: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations,30]
        sem_destroy(&sem);
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/semaphore.h:53:26: note: 'sem_destroy' has been explicitly marked deprecated here [2]
 int sem_destroy(sem_t *) __deprecated;
                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sys/cdefs.h:176:40: note: expanded from macro '__deprecated'
 #define __deprecated    __attribute__((deprecated))
                                        ^
  • p=iphone tools=no arch=x86_64 (no warning with arch=arm64) in thirdparty/bullet/LinearMath/btVector3.h (same as on macOS)
thirdparty/bullet/LinearMath/btVector3.h:335:7: warning: argument value 10880 is outside the valid range [0, 255] [-Wargument-outside-range]
                y = bt_splat_ps(y, 0x80);
                    ^~~~~~~~~~~~~~~~~~~~
thirdparty/bullet/LinearMath/btVector3.h:43:29: note: expanded from macro 'bt_splat_ps'
#define bt_splat_ps(_a, _i) bt_pshufd_ps((_a), BT_SHUFFLE(_i, _i, _i, _i))
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thirdparty/bullet/LinearMath/btVector3.h:41:33: note: expanded from macro 'bt_pshufd_ps'
#define bt_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include/xmmintrin.h:2608:11: note: expanded from macro '_mm_shuffle_ps'
  (__m128)__builtin_ia32_shufps((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), \
          ^
  • p=iphone tools=no arch=x86_64 (no warning with arch=arm64) in thirdparty/bullet/LinearMath/btMatrix3x3.h (same as on macOS)
thirdparty/bullet/LinearMath/btMatrix3x3.h:910:14: warning: argument value 10880 is outside the valid range [0, 255] [-Wargument-outside-range]
        __m128 vk = bt_splat_ps(_mm_load_ss((float*)&k), 0x80);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thirdparty/bullet/LinearMath/btVector3.h:43:29: note: expanded from macro 'bt_splat_ps'
#define bt_splat_ps(_a, _i) bt_pshufd_ps((_a), BT_SHUFFLE(_i, _i, _i, _i))
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thirdparty/bullet/LinearMath/btVector3.h:41:33: note: expanded from macro 'bt_pshufd_ps'
#define bt_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include/xmmintrin.h:2608:11: note: expanded from macro '_mm_shuffle_ps'
  (__m128)__builtin_ia32_shufps((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), \
          ^
🔸 MinGW-w64 6.0.0-1 / GCC 8.3.0 cross-build on macOS:
  • p=windows tools=yes in platform/windows/windows_terminal_logger.cpp
platform/windows/windows_terminal_logger.cpp: In member function 'virtual void WindowsTerminalLogger::logv(const char*, va_list, bool)':
platform/windows/windows_terminal_logger.cpp:48:10: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
  if (len >= BUFFER_SIZE)
      ~~~~^~~~~~~~~~~~~~
  • p=windows tools=yes in platform/windows/power_windows.cpp
platform/windows/power_windows.cpp: In member function 'bool PowerWindows::GetPowerInfo_Windows()':
platform/windows/power_windows.cpp:92:12: warning: comparison of integer expressions of different signedness: 'const int' and 'unsigned int' [-Wsign-compare]
   if (secs != 0xFFFFFFFF) { /* ((DWORD)-1) == unknown */
       ~~~~~^~~~~~~~~~~~~
  • p=windows tools=yes in platform/windows/joypad_windows.cpp
platform/windows/joypad_windows.cpp: In member function 'bool JoypadWindows::is_xinput_device(const GUID*)':
platform/windows/joypad_windows.cpp:106:79: warning: comparison of integer expressions of different signedness: 'UINT' {aka 'unsigned int'} and 'int' [-Wsign-compare]
  if (GetRawInputDeviceList(NULL, &dev_list_count, sizeof(RAWINPUTDEVICELIST)) == -1) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
platform/windows/joypad_windows.cpp:112:83: warning: comparison of integer expressions of different signedness: 'UINT' {aka 'unsigned int'} and 'int' [-Wsign-compare]
  if (GetRawInputDeviceList(dev_list, &dev_list_count, sizeof(RAWINPUTDEVICELIST)) == -1) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
platform/windows/joypad_windows.cpp:116:20: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
  for (int i = 0; i < dev_list_count; i++) {
                  ~~^~~~~~~~~~~~~~~~
platform/windows/joypad_windows.cpp: In member function 'void JoypadWindows::process_joypads()':
platform/windows/joypad_windows.cpp:337:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
    for (int i = 0; i <= 16; i++) {
             ^
platform/windows/joypad_windows.cpp:325:11: note: shadowed declaration is here
  for (int i = 0; i < XUSER_MAX_COUNT; i++) {
           ^
platform/windows/joypad_windows.cpp:415:26: warning: comparison of integer expressions of different signedness: 'long unsigned int' and 'int' [-Wsign-compare]
     if (joy->joy_axis[j] == axes[k]) {
platform/windows/joypad_windows.cpp: In member function 'void JoypadWindows::post_hat(int, DWORD)':
platform/windows/joypad_windows.cpp:429:13: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  if (p_dpad == -1) {
      ~~~~~~~^~~~~
  • p=windows tools=yes in platform/windows/os_windows.cpp
platform/windows/os_windows.cpp: In member function 'virtual void OS_Windows::set_window_size(Size2)':
platform/windows/os_windows.cpp:1819:8: warning: declaration of 'rect' shadows a previous local [-Wshadow=local]
   RECT rect;
        ^~~~
platform/windows/os_windows.cpp:1804:7: note: shadowed declaration is here
  RECT rect;
       ^~~~
platform/windows/os_windows.cpp: In member function 'virtual Error OS_Windows::execute(const String&, const List<String>&, bool, OS::ProcessID*, String*, int*, bool, Mutex*)':
platform/windows/os_windows.cpp:2528:9: warning: declaration of 'ret' shadows a previous local [-Wshadow=local]
   DWORD ret = WaitForSingleObject(pi.pi.hProcess, INFINITE);
         ^~~
platform/windows/os_windows.cpp:2523:6: note: shadowed declaration is here
  int ret = CreateProcessW(NULL, modstr.ptrw(), NULL, NULL, 0, NORMAL_PRIORITY_CLASS, NULL, NULL, si_w, &pi.pi);
      ^~~
  • p=windows tools=yes in platform/windows/os_windows.cpp
platform/windows/os_windows.cpp: In member function 'virtual uint64_t OS_Windows::get_unix_time() const':
platform/windows/os_windows.cpp:2196:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  return (*(uint64_t *)&ft - *(uint64_t *)&fep) / 10000000;
           ^~~~~~~~~~~~~~~
platform/windows/os_windows.cpp:2196:30: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  return (*(uint64_t *)&ft - *(uint64_t *)&fep) / 10000000;
                              ^~~~~~~~~~~~~~~~
  • p=windows tools=yes in drivers/unix/net_socket_posix.cpp
drivers/unix/net_socket_posix.cpp: In member function 'virtual Error NetSocketPosix::bind(IP_Address, uint16_t)':
drivers/unix/net_socket_posix.cpp:309:57: warning: comparison of integer expressions of different signedness: 'int' and 'SOCKET' {aka 'long long unsigned int'} [-Wsign-compare]
  if (::bind(_sock, (struct sockaddr *)&addr, addr_size) == SOCK_EMPTY) {
                                                         ^
drivers/unix/net_socket_posix.cpp: In member function 'virtual Error NetSocketPosix::listen(int)':
drivers/unix/net_socket_posix.cpp:320:37: warning: comparison of integer expressions of different signedness: 'int' and 'SOCKET' {aka 'long long unsigned int'} [-Wsign-compare]
  if (::listen(_sock, p_max_pending) == SOCK_EMPTY) {
                                     ^
drivers/unix/net_socket_posix.cpp: In member function 'virtual Error NetSocketPosix::connect_to_host(IP_Address, uint16_t)':
drivers/unix/net_socket_posix.cpp:337:60: warning: comparison of integer expressions of different signedness: 'int' and 'SOCKET' {aka 'long long unsigned int'} [-Wsign-compare]
  if (::connect(_sock, (struct sockaddr *)&addr, addr_size) == SOCK_EMPTY) {
                                                            ^
  • p=windows tools=yes in drivers/windows/file_access_windows.cpp
drivers/windows/file_access_windows.cpp: In member function 'virtual void FileAccessWindows::store_buffer(const uint8_t*, int)':
drivers/windows/file_access_windows.cpp:305:46: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'int' [-Wsign-compare]
  ERR_FAIL_COND(fwrite(p_src, 1, p_length, f) != p_length);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
./core/typedefs.h:317:41: note: in definition of macro 'unlikely'
 #define unlikely(x) __builtin_expect(!!(x), 0)
                                         ^
drivers/windows/file_access_windows.cpp:305:2: note: in expansion of macro 'ERR_FAIL_COND'
  ERR_FAIL_COND(fwrite(p_src, 1, p_length, f) != p_length);
  ^~~~~~~~~~~~~
  • p=windows tools=yes in drivers/wasapi/audio_driver_wasapi.cpp
drivers/wasapi/audio_driver_wasapi.cpp: In member function 'virtual ULONG CMMNotificationClient::Release()':
drivers/wasapi/audio_driver_wasapi.cpp:93:11: warning: deleting object of polymorphic class type 'CMMNotificationClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
    delete this;
           ^~~~
  • p=windows tools=yes in drivers/wasapi/audio_driver_wasapi.cpp
drivers/wasapi/audio_driver_wasapi.cpp: In member function 'Error AudioDriverWASAPI::audio_device_init(AudioDriverWASAPI::AudioDeviceWASAPI*, bool, bool)':
drivers/wasapi/audio_driver_wasapi.cpp:170:15: warning: declaration of 'device' shadows a previous local [-Wshadow=local]
    IMMDevice *device = NULL;
               ^~~~~~
drivers/wasapi/audio_driver_wasapi.cpp:147:13: note: shadowed declaration is here
  IMMDevice *device = NULL;
             ^~~~~~
drivers/wasapi/audio_driver_wasapi.cpp:292:15: warning: comparison of integer expressions of different signedness: 'int' and 'DWORD' {aka 'long unsigned int'} [-Wsign-compare]
  if (mix_rate != pwfex->nSamplesPerSec) {
      ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
drivers/wasapi/audio_driver_wasapi.cpp: In static member function 'static void AudioDriverWASAPI::thread_func(void*)':
drivers/wasapi/audio_driver_wasapi.cpp:574:32: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
     for (unsigned int i = 0; i < ad->samples_in.size(); i++) {
                              ~~^~~~~~~~~~~~~~~~~~~~~~~
drivers/wasapi/audio_driver_wasapi.cpp:702:24: warning: comparison of integer expressions of different signedness: 'int' and 'UINT32' {aka 'unsigned int'} [-Wsign-compare]
      for (int j = 0; j < num_frames_available; j++) {
                      ~~^~~~~~~~~~~~~~~~~~~~~~

Edit: Added new warning (4493957 - introduced in #28390)

@akien-mga
Copy link
Member Author

akien-mga commented Jun 15, 2019

I ticked the ones that should be fixed by #29797.

I also ticked the bullet warnings which should have been fixed by #29418.

@akien-mga
Copy link
Member Author

I'm going to move the remaining warnings to platform-specific tickets, it will be easier to have a good overview.

@akien-mga
Copy link
Member Author

Superseded by #29799, #29780 and #29781 (+ remaining warnings fixed by #29797).

akien-mga added a commit to akien-mga/godot that referenced this issue Jun 15, 2019
Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0.

JS can now build with `werror=yes warnings=extra`.
MinGW64 still has a few warnings to resolve with `warnings=extra`,
and only one with `warnings=all`.

Part of godotengine#29033 and godotengine#29801.
myhalibobo pushed a commit to myhalibobo/godot that referenced this issue Sep 3, 2019
Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0.

JS can now build with `werror=yes warnings=extra`.
MinGW64 still has a few warnings to resolve with `warnings=extra`,
and only one with `warnings=all`.

Part of godotengine#29033 and godotengine#29801.
@Calinou
Copy link
Member

Calinou commented Sep 22, 2019

@akien-mga Should this issue be closed now?

@akien-mga
Copy link
Member Author

Yes, seems I forgot to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants