8079965: Stop ignoring warnings for libawt_lwawt

Reviewed-by: prr, ihse
This commit is contained in:
Sergey Bylokhov 2015-09-26 22:38:36 +03:00
parent 3019b8d259
commit ebf2ca56f0
21 changed files with 68 additions and 87 deletions

View File

@ -959,10 +959,9 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(X_CFLAGS) \
$(X_LIBS) \
$(LIBAWT_LWAWT_CFLAGS), \
DISABLED_WARNINGS_clang := incomplete-implementation \
DISABLED_WARNINGS_clang := incomplete-implementation enum-conversion \
deprecated-declarations objc-method-access bitwise-op-parentheses \
incompatible-pointer-types parentheses-equality extra-tokens, \
WARNINGS_AS_ERRORS_clang := false, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-L$(INSTALL_LIBRARIES_HERE), \

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,8 +26,6 @@
#ifndef __AWTEVENT_H
#define __AWTEVENT_H
#import "LWCToolkit.h"
jlong UTC(NSEvent *event);
void DeliverJavaKeyEvent(JNIEnv *env, NSEvent *event, jobject peer);
void DeliverJavaMouseEvent(JNIEnv *env, NSEvent *event, jobject peer);

View File

@ -23,18 +23,15 @@
* questions.
*/
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
#import <sys/time.h>
#include <Carbon/Carbon.h>
#import "jni_util.h"
#import "LWCToolkit.h"
#import "ThreadUtilities.h"
#import "java_awt_event_InputEvent.h"
#import "java_awt_event_KeyEvent.h"
#import "java_awt_event_MouseEvent.h"
#import "LWCToolkit.h"
#import "jni_util.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import <sys/time.h>
#import <Carbon/Carbon.h>
/*
* Table to map typed characters to their Java virtual key equivalent and back.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
*/
#import <Cocoa/Cocoa.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "CDragSource.h"
#import "CDropTarget.h"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,22 +23,17 @@
* questions.
*/
#import "CGLGraphicsConfig.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
#import "jni_util.h"
#import "ThreadUtilities.h"
#import "CGLGraphicsConfig.h"
#import "AWTView.h"
#import "AWTEvent.h"
#import "AWTWindow.h"
#import "LWCToolkit.h"
#import "JavaComponentAccessibility.h"
#import "JavaTextAccessibility.h"
#import "GeomUtilities.h"
#import "OSVersion.h"
#import "CGLLayer.h"
#import "ThreadUtilities.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
@interface AWTView()
@property (retain) CDropTarget *_dropTarget;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -27,13 +27,12 @@
#define _AWTWINDOW_H
#import <Cocoa/Cocoa.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "CMenuBar.h"
#import "LWCToolkit.h"
@class AWTView;
@class JNFWeakJObjectWrapper;
@interface AWTWindow : NSObject <NSWindowDelegate> {
@private

View File

@ -25,7 +25,6 @@
#import <Cocoa/Cocoa.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
#import "sun_lwawt_macosx_CPlatformWindow.h"
#import "com_apple_eawt_event_GestureHandler.h"
@ -34,12 +33,8 @@
#import "AWTWindow.h"
#import "AWTView.h"
#import "CMenu.h"
#import "CMenuBar.h"
#import "LWCToolkit.h"
#import "GeomUtilities.h"
#import "ThreadUtilities.h"
#import "OSVersion.h"
#define MASK(KEY) \
(sun_lwawt_macosx_CPlatformWindow_ ## KEY)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,11 +26,9 @@
#import "CDataTransferer.h"
#include "sun_lwawt_macosx_CDataTransferer.h"
#import <AppKit/AppKit.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "jni_util.h"
#include "ThreadUtilities.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
// ***** NOTE ***** This dictionary corresponds to the static array predefinedClipboardNames

View File

@ -27,7 +27,7 @@
#include "GeomUtilities.h"
#include "sun_awt_CGraphicsConfig.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
/*
* Class: sun_awt_CGraphicsConfig

View File

@ -26,6 +26,8 @@
#import "LWCToolkit.h"
#import "ThreadUtilities.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
/*
* Convert the mode string to the more convinient bits per pixel value
*/
@ -200,7 +202,7 @@ JNF_COCOA_ENTER(env);
for (NSScreen *screen in screens) {
NSDictionary *screenInfo = [screen deviceDescription];
NSNumber *screenID = [screenInfo objectForKey:@"NSScreenNumber"];
if ([screenID pointerValue] == displayID){
if ([screenID unsignedIntValue] == displayID){
frame = [screen frame];
visibleFrame = [screen visibleFrame];
break;
@ -333,7 +335,7 @@ JNF_COCOA_ENTER(env);
for (NSScreen *screen in screens) {
NSDictionary *screenInfo = [screen deviceDescription];
NSNumber *screenID = [screenInfo objectForKey:@"NSScreenNumber"];
if ([screenID pointerValue] == displayID){
if ([screenID unsignedIntValue] == displayID){
if ([screen respondsToSelector:@selector(backingScaleFactor)]) {
ret = [screen backingScaleFactor];
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,12 +23,11 @@
* questions.
*/
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "jni_util.h"
#import "LWCToolkit.h"
#import "AWT_debug.h"
#import "jni_util.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#define MAX_DISPLAYS 64

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -58,6 +58,14 @@ static void nsPrintInfoToJavaPrinterJob(JNIEnv* env, NSPrintInfo* src, jobject d
static void javaPrinterJobToNSPrintInfo(JNIEnv* env, jobject srcPrinterJob, jobject srcPageable, NSPrintInfo* dst);
#ifdef __MAC_10_9 // code for SDK 10.9 or newer
#define NS_PORTRAIT NSPaperOrientationPortrait
#define NS_LANDSCAPE NSPaperOrientationLandscape
#else // code for SDK 10.8 or older
#define NS_PORTRAIT NSPortraitOrientation
#define NS_LANDSCAPE NSLandscapeOrientation
#endif
static NSPrintInfo* createDefaultNSPrintInfo(JNIEnv* env, jstring printer)
{
NSPrintInfo* defaultPrintInfo = [[NSPrintInfo sharedPrintInfo] copy];
@ -143,12 +151,12 @@ static void nsPrintInfoToJavaPaper(JNIEnv* env, NSPrintInfo* src, jobject dst)
NSSize paperSize = [src paperSize];
switch ([src orientation]) {
case NSPortraitOrientation:
case NS_PORTRAIT:
jPaperW = paperSize.width;
jPaperH = paperSize.height;
break;
case NSLandscapeOrientation:
case NS_LANDSCAPE:
jPaperW = paperSize.height;
jPaperH = paperSize.width;
break;
@ -217,13 +225,12 @@ static void nsPrintInfoToJavaPageFormat(JNIEnv* env, NSPrintInfo* src, jobject d
static JNF_CTOR_CACHE(jm_Paper_ctor, sjc_Paper, "()V");
jint jOrientation;
NSPrintingOrientation nsOrientation = [src orientation];
switch (nsOrientation) {
case NSPortraitOrientation:
switch ([src orientation]) {
case NS_PORTRAIT:
jOrientation = java_awt_print_PageFormat_PORTRAIT;
break;
case NSLandscapeOrientation:
case NS_LANDSCAPE:
jOrientation = java_awt_print_PageFormat_LANDSCAPE; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
break;
@ -273,20 +280,20 @@ static void javaPageFormatToNSPrintInfo(JNIEnv* env, jobject srcPrintJob, jobjec
switch (JNFCallIntMethod(env, srcPageFormat, jm_getOrientation)) { // AWT_THREADING Safe (!appKit)
case java_awt_print_PageFormat_PORTRAIT:
[dstPrintInfo setOrientation:NSPortraitOrientation];
[dstPrintInfo setOrientation:NS_PORTRAIT];
break;
case java_awt_print_PageFormat_LANDSCAPE:
[dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
[dstPrintInfo setOrientation:NS_LANDSCAPE]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
break;
// AppKit printing doesn't support REVERSE_LANDSCAPE. Radar 2960295.
case java_awt_print_PageFormat_REVERSE_LANDSCAPE:
[dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
[dstPrintInfo setOrientation:NS_LANDSCAPE]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
break;
default:
[dstPrintInfo setOrientation:NSPortraitOrientation];
[dstPrintInfo setOrientation:NS_PORTRAIT];
break;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,10 @@
* questions.
*/
#import "jni_util.h"
#import <AppKit/AppKit.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "jni_util.h"
#import "CTrayIcon.h"
#import "ThreadUtilities.h"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,8 +24,7 @@
*/
#import <Cocoa/Cocoa.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#include "jni.h"
jobject CGToJavaRect(JNIEnv *env, CGRect rect);
CGRect JavaToCGRect(JNIEnv *env, jobject rect);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,6 +24,7 @@
*/
#import "GeomUtilities.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
static JNF_CLASS_CACHE(sjc_Point2D, "java/awt/geom/Point2D");
static JNF_MEMBER_CACHE(jm_pt_getX, sjc_Point2D, "getX", "()D");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,9 +23,9 @@
* questions.
*/
#import <AppKit/AppKit.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#include "jni.h"
#import <AppKit/AppKit.h>
//#define JAVA_AX_DEBUG 1
//#define JAVA_AX_NO_IGNORES 1

View File

@ -23,11 +23,12 @@
* questions.
*/
#include "jni.h"
#import <pthread.h>
#import <assert.h>
#import <Cocoa/Cocoa.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#define DEBUG 1

View File

@ -28,15 +28,10 @@
#import <objc/runtime.h>
#import <Cocoa/Cocoa.h>
#import <Security/AuthSession.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
#include "jni_util.h"
#import "CMenuBar.h"
#import "InitIDs.h"
#import "LWCToolkit.h"
#import "ThreadUtilities.h"
#import "AWT_debug.h"
#import "CSystemColors.h"
#import "NSApplicationAWT.h"
#import "PropertiesUtilities.h"
@ -46,6 +41,8 @@
#import "sizecalc.h"
#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
int gNumberOfButtons;
jint* gButtonDownMasks;

View File

@ -23,20 +23,17 @@
* questions.
*/
#import "sun_java2d_opengl_CGLGraphicsConfig.h"
#import "CGLGraphicsConfig.h"
#import "CGLSurfaceData.h"
#import "ThreadUtilities.h"
#import <stdlib.h>
#import <string.h>
#import <ApplicationServices/ApplicationServices.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "sun_java2d_opengl_CGLGraphicsConfig.h"
#import "jni.h"
#import "jni_util.h"
#import "CGLGraphicsConfig.h"
#import "CGLSurfaceData.h"
#import "LWCToolkit.h"
#import "ThreadUtilities.h"
#pragma mark -
#pragma mark "--- Mac OS X specific methods for GL pipeline ---"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
#ifndef CGLLayer_h_Included
#define CGLLayer_h_Included
#import "AWTView.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
@interface CGLLayer : CAOpenGLLayer
{

View File

@ -24,16 +24,13 @@
*/
#import <stdlib.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "sun_java2d_opengl_CGLSurfaceData.h"
#import "jni.h"
#import "jni_util.h"
#import "OGLRenderQueue.h"
#import "CGLGraphicsConfig.h"
#import "CGLSurfaceData.h"
#import "CGLLayer.h"
#import "ThreadUtilities.h"
/* JDK's glext.h is already included and will prevent the Apple glext.h