Skip to content

Commit 443796f

Browse files
Merge branch 'gyp-rejig_warnings' of https://github.com/livecodefraser/livecode into gyp-rejig_warnings_7.0
Conflicts: engine/src/mac-menu.mm engine/src/player-platform.cpp thirdparty
2 parents 4d9fff4 + 6da19fc commit 443796f

9 files changed

Lines changed: 176 additions & 14 deletions

File tree

config/android.gypi

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
'ext_suffix': '',
3535
'exe_suffix': '',
3636
'debug_info_suffix': '.dbg',
37+
38+
'silence_warnings': 0,
3739
},
3840

3941
'cflags':
4042
[
41-
'-Wall',
42-
'-Wextra',
4343
'-fstrict-aliasing',
4444
],
4545

@@ -56,6 +56,33 @@
5656
'-fno-rtti',
5757
],
5858

59+
'target_conditions':
60+
[
61+
[
62+
'silence_warnings == 0',
63+
{
64+
'cflags':
65+
[
66+
'-Wall',
67+
'-Wextra',
68+
'-Wno-unused-parameter', # Just contributes build noise
69+
],
70+
71+
'cflags_c':
72+
[
73+
'-Werror=declaration-after-statement', # Ensure compliance with C89
74+
],
75+
},
76+
{
77+
'cflags':
78+
[
79+
'-w', # Disable warnings
80+
'-fpermissive', # Be more lax with old code
81+
],
82+
},
83+
],
84+
],
85+
5986
'configurations':
6087
{
6188
'Debug':

config/ios.gypi

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
'lib_suffix': '.dylib',
5353
'ext_suffix': '.so',
5454
'debug_info_suffix': '.dSYM',
55+
56+
'silence_warnings': 0,
5557
},
5658

5759
'defines':
@@ -125,6 +127,56 @@
125127
],
126128
},
127129
],
130+
[
131+
'silence_warnings == 0',
132+
{
133+
'xcode_settings':
134+
{
135+
'GCC_WARN_CHECK_SWITCH_STATEMENTS': 'YES',
136+
'CLANG_WARN_EMPTY_BODY': 'YES',
137+
'GCC_WARN_SHADOW': 'YES',
138+
'CLANG_WARN_BOOL_CONVERSION': 'YES',
139+
'CLANG_WARN_CONSTANT_CONVERSION': 'YES',
140+
'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES',
141+
'CLANG_WARN_ENUM_CONVERSION': 'YES',
142+
'CLANG_WARN_INT_CONVERSION': 'YES',
143+
'CLANG_WARN_IMPLICIT_SIGN_CONVERSION': 'YES',
144+
'GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED': 'YES',
145+
'GCC_WARN_ABOUT_RETURN_TYPE': 'YES',
146+
'GCC_WARN_MISSING_PARENTHESES': 'YES',
147+
'GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS': 'YES',
148+
'GCC_WARN_ABOUT_MISSING_PROTOTYPES': 'NO',
149+
'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
150+
'CLANG_WARN_ASSIGN_ENUM': 'YES',
151+
'GCC_WARN_ABOUT_POINTER_SIGNEDNESS': 'YES',
152+
'GCC_WARN_SIGN_COMPARE': 'YES',
153+
'CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION': 'YES',
154+
'GCC_WARN_TYPECHECK_CALLS_TO_PRINTF': 'YES',
155+
'GCC_WARN_UNINITIALIZED_AUTOS': 'YES',
156+
'GCC_WARN_UNKNOWN_PRAGMAS': 'YES',
157+
'CLANG_WARN_UNREACHABLE_CODE': 'YES',
158+
'GCC_WARN_UNUSED_FUNCTION': 'YES',
159+
'GCC_WARN_UNUSED_LABEL': 'YES',
160+
'GCC_WARN_UNUSED_PARAMETER': 'NO',
161+
'GCC_WARN_UNUSED_VALUE': 'YES',
162+
'GCC_WARN_UNUSED_VARIABLE': 'YES',
163+
164+
'WARNING_CFLAGS':
165+
[
166+
'-Wall',
167+
'-Wextra',
168+
'-Werror=declaration-after-statement',
169+
'-Wno-unused-parameter',
170+
],
171+
},
172+
},
173+
{
174+
'xcode_settings':
175+
{
176+
'GCC_INHIBIT_ALL_WARNINGS': 'YES',
177+
},
178+
},
179+
],
128180
],
129181
},
130182

config/linux.gypi

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
'debug_info_suffix': '.dbg',
1717

1818
'c++_std': '<!(echo ${CXX_STD:-gnu++03})',
19+
20+
'silence_warnings': 0,
1921
},
2022

2123
'defines':
@@ -74,12 +76,33 @@
7476
],
7577
},
7678
],
79+
[
80+
'silence_warnings == 0',
81+
{
82+
'cflags':
83+
[
84+
'-Wall',
85+
'-Wextra',
86+
'-Wno-unused-parameter', # Just contributes build noise
87+
],
88+
},
89+
{
90+
'cflags':
91+
[
92+
'-w', # Disable warnings
93+
'-fpermissive', # Be more lax with old code
94+
],
95+
96+
'cflags_c':
97+
[
98+
'-Werror=declaration-after-statement', # Ensure compliance with C89
99+
],
100+
},
101+
],
77102
],
78103

79104
'cflags':
80105
[
81-
'-Wall',
82-
'-Wextra',
83106
'-fstrict-aliasing',
84107
],
85108

config/mac.gypi

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
'lib_suffix': '.dylib',
4343
'ext_suffix': '.so',
4444
'debug_info_suffix': '.dSYM',
45+
46+
'silence_warnings': 0,
4547
},
4648

4749
'target_conditions':
@@ -77,6 +79,56 @@
7779
},
7880
},
7981
],
82+
[
83+
'silence_warnings == 0',
84+
{
85+
'xcode_settings':
86+
{
87+
'GCC_WARN_CHECK_SWITCH_STATEMENTS': 'YES',
88+
'CLANG_WARN_EMPTY_BODY': 'YES',
89+
'GCC_WARN_SHADOW': 'YES',
90+
'CLANG_WARN_BOOL_CONVERSION': 'YES',
91+
'CLANG_WARN_CONSTANT_CONVERSION': 'YES',
92+
'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES',
93+
'CLANG_WARN_ENUM_CONVERSION': 'YES',
94+
'CLANG_WARN_INT_CONVERSION': 'YES',
95+
'CLANG_WARN_IMPLICIT_SIGN_CONVERSION': 'YES',
96+
'GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED': 'YES',
97+
'GCC_WARN_ABOUT_RETURN_TYPE': 'YES',
98+
'GCC_WARN_MISSING_PARENTHESES': 'YES',
99+
'GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS': 'YES',
100+
'GCC_WARN_ABOUT_MISSING_PROTOTYPES': 'NO',
101+
'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
102+
'CLANG_WARN_ASSIGN_ENUM': 'YES',
103+
'GCC_WARN_ABOUT_POINTER_SIGNEDNESS': 'YES',
104+
'GCC_WARN_SIGN_COMPARE': 'YES',
105+
'CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION': 'YES',
106+
'GCC_WARN_TYPECHECK_CALLS_TO_PRINTF': 'YES',
107+
'GCC_WARN_UNINITIALIZED_AUTOS': 'YES',
108+
'GCC_WARN_UNKNOWN_PRAGMAS': 'YES',
109+
'CLANG_WARN_UNREACHABLE_CODE': 'YES',
110+
'GCC_WARN_UNUSED_FUNCTION': 'YES',
111+
'GCC_WARN_UNUSED_LABEL': 'YES',
112+
'GCC_WARN_UNUSED_PARAMETER': 'NO',
113+
'GCC_WARN_UNUSED_VALUE': 'YES',
114+
'GCC_WARN_UNUSED_VARIABLE': 'YES',
115+
116+
'WARNING_CFLAGS':
117+
[
118+
'-Wall',
119+
'-Wextra',
120+
'-Werror=declaration-after-statement',
121+
'-Wno-unused-parameter',
122+
],
123+
},
124+
},
125+
{
126+
'xcode_settings':
127+
{
128+
'GCC_INHIBIT_ALL_WARNINGS': 'YES',
129+
},
130+
},
131+
],
80132
],
81133

82134
'configurations':

engine/engine-sources.gypi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,14 @@
789789
'src/java/com/runrev/android/billing/google/Security.java',
790790
'src/java/com/runrev/android/billing/google/GoogleBillingProvider.java',
791791
'src/java/com/runrev/android/billing/samsung/SamsungBillingProvider.java',
792+
'src/java/com/runrev/android/nativecontrol/BrowserControl.java',
793+
'src/java/com/runrev/android/nativecontrol/ExtVideoView.java',
794+
'src/java/com/runrev/android/nativecontrol/InputControl.java',
795+
'src/java/com/runrev/android/nativecontrol/InputView.java',
796+
'src/java/com/runrev/android/nativecontrol/NativeControl.java',
797+
'src/java/com/runrev/android/nativecontrol/NativeControlModule.java',
798+
'src/java/com/runrev/android/nativecontrol/ScrollerControl.java',
799+
'src/java/com/runrev/android/nativecontrol/VideoControl.java',
792800
],
793801

794802
# AIDL sources for Android

engine/src/mac-menu.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ - (BOOL)performKeyEquivalent: (NSEvent *)event
423423
// SN-2014-12-05: [[ Bug 14019 ]] Forbid any Cmd-key reaction when the target is the colour picker
424424
// (that colour picker is modal after all)
425425
if ([[[event window] delegate] isKindOfClass: [MCColorPanelDelegate class]])
426-
return false;
426+
return NO;
427427

428428
// If the event is not targetted at one of our windows, we just let things
429429
// flow as normal.

revbrowser/src/cefbrowser_osx.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ bool MCCefPlatformCreateBrowser(int p_window_id, MCCefBrowserBase *&r_browser)
240240

241241
NSView *t_handle;
242242
if (!GetWindowHandle(t_handle))
243-
return false;
243+
return;
244244

245245
t_handle = t_handle;
246246
}

revvideograbber/src/rrecapture.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ - (BOOL)startRecording: (BOOL *)r_success
784784
- (BOOL)stopRecording: (BOOL *)r_success
785785
{
786786
if (m_record_state == kCaptureSessionStateStopped)
787-
return;
787+
return NO;
788788

789789
[m_record_output recordToOutputFileURL: nil];
790790

@@ -1178,7 +1178,7 @@ void rreCaptureResumePreviewing(void)
11781178
NSString *rreCapturePreviewState(void)
11791179
{
11801180
if (!CaptureSessionExists())
1181-
return;
1181+
return nil;
11821182

11831183
return [g_session previewState];
11841184
}
@@ -1259,7 +1259,7 @@ void rreCaptureSetRecordOutput(NSString *p_image_id)
12591259
NSString *rreCaptureStartRecording(void)
12601260
{
12611261
if (!CaptureSessionExists())
1262-
return;
1262+
return nil;
12631263

12641264
BOOL t_success;
12651265
if (![g_session startRecording: &t_success])
@@ -1274,7 +1274,7 @@ void rreCaptureSetRecordOutput(NSString *p_image_id)
12741274
NSString *rreCaptureStopRecording(void)
12751275
{
12761276
if (!CaptureSessionExists())
1277-
return;
1277+
return nil;
12781278

12791279
BOOL t_success;
12801280
[g_session stopRecording: &t_success];
@@ -1309,7 +1309,7 @@ void rreCaptureResumeRecording(void)
13091309
int32_t rreCaptureGetRecordFrameRate(void)
13101310
{
13111311
if (!CaptureSessionExists())
1312-
return;
1312+
return nil;
13131313

13141314
return [g_session maxFrameRate];
13151315
}
@@ -1325,7 +1325,7 @@ void rreCaptureSetRecordFrameRate(int32_t p_rate)
13251325
NSString *rreCaptureGetRecordFrameSize(void)
13261326
{
13271327
if (!CaptureSessionExists())
1328-
return;
1328+
return nil;
13291329

13301330
NSSize t_size;
13311331
t_size = [g_session maxFrameSize];
@@ -1345,7 +1345,7 @@ void rreCaptureSetRecordFrameSize(int32_t p_width, int32_t p_height)
13451345
NSString *rreCaptureRecordState(void)
13461346
{
13471347
if (!CaptureSessionExists())
1348-
return;
1348+
return nil;
13491349

13501350
return [g_session recordState];
13511351
}

thirdparty

0 commit comments

Comments
 (0)