Changeset 333


Ignore:
Timestamp:
Feb 22, 2012, 8:50:40 PM (13 years ago)
Author:
dmik
Message:

jdk: Fix a whole bunch of warnings and a few build errors.

GCC is more strict than MSVC.

Location:
trunk/openjdk
Files:
73 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/hotspot/make/os2/makefiles/compile.make

    r325 r333  
    101101CPP_FLAGS += -D__WIN32OS2__ -D__i386__ -DSTRICT -D_POSIX_SOURCE \
    102102             -D_POSIX_C_SOURCE=200112 -D_EMX_SOURCE -D_XOPEN_SOURCE=600 \
    103                  -D_SVID_SOURCE
     103                 -D_SVID_SOURCE -DOS2EMX_PLAIN_CHAR
    104104CPP_FLAGS += -I$(ALT_ODINSDK_HEADERS_PATH)/Win -I$(ALT_ODINSDK_HEADERS_PATH)
    105105
  • trunk/openjdk/jdk/make/common/Defs-os2.gmk

    r330 r333  
    124124
    125125# We compile a lot of MSVC code which seems to silently tolerate this
    126 GCC_WARNINGS += -Wno-sign-compare
    127 GCC_WARNINGS_C += -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-missing-field-initializers
     126GCC_WARNINGS += -Wno-sign-compare -Wno-type-limits -Wno-missing-field-initializers -Wno-missing-braces
     127GCC_WARNINGS_C += -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
    128128GCC_WARNINGS_CXX += -Wno-write-strings
    129129
     
    146146CXXFLAGS_DBG    = $(CFLAGS_DBG)
    147147
     148# Some code uses very unstrict aliasing turn this optimization off
     149CFLAGS_COMMON += -fno-strict-aliasing
     150CXXFLAGS_COMMON += -fno-strict-aliasing
     151
    148152#
    149153# Preprocessor macro definitions
     
    173177CPPFLAGS_COMMON += -D__WIN32OS2__ -D__i386__ -DSTRICT -D_POSIX_SOURCE \
    174178                   -D_POSIX_C_SOURCE=200112 -D_EMX_SOURCE -D_XOPEN_SOURCE=600 \
    175                                    -D_SVID_SOURCE
     179                                   -D_SVID_SOURCE -DOS2EMX_PLAIN_CHAR
    176180CPPFLAGS_COMMON += -I$(ODINSDK_HEADERS_PATH)/Win -I$(ODINSDK_HEADERS_PATH) \
    177181                   -DWINE_LARGE_INTEGER
  • trunk/openjdk/jdk/src/share/bin/java.c

    r278 r333  
    205205    int ret;
    206206    InvocationFunctions ifn;
    207     jlong start, end;
     207    jlong start = 0, end;
    208208    char jrepath[MAXPATHLEN], jvmpath[MAXPATHLEN];
    209209    char ** original_argv = argv;
     
    389389    jobjectArray mainArgs;
    390390    int ret = 0;
    391     jlong start, end;
     391    jlong start = 0, end;
    392392
    393393    /*
     
    13901390    char *s = buf, *t = name, c;
    13911391    jclass cls;
    1392     jlong start, end;
     1392    jlong start = 0, end;
    13931393
    13941394    if (_launcher_debug)
     
    18091809    int cnt = 0;
    18101810    int lineno = 0;
    1811     jlong start, end;
     1811    jlong start = 0, end;
    18121812    int vmType;
    18131813    char *tmpPtr;
  • trunk/openjdk/jdk/src/share/instrument/InvocationAdapter.c

    r278 r333  
    3030#include    <string.h>
    3131#include    <stdlib.h>
     32
     33#ifdef __EMX__
     34#include <strings.h> // strcasecmp
     35#endif
    3236
    3337#include    "jni.h"
  • trunk/openjdk/jdk/src/share/instrument/JarFacade.c

    r278 r333  
    2626#include <string.h>
    2727#include <stdlib.h>
     28
     29#ifdef __EMX__
     30#include <strings.h> // strcasecmp
     31#endif
    2832
    2933#include "jni.h"
  • trunk/openjdk/jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c

    r278 r333  
    4949    int isSigned;
    5050    int isBigEndian;
    51     UINT8* conversionBuffer;
     51    char* conversionBuffer;
    5252    int conversionBufferSize;
    5353} DAUDIO_Info;
     
    173173 * as conversionSize
    174174 */
    175 void handleSignEndianConversion(INT8* data, INT8* output, int byteSize, int conversionSize) {
     175static void handleSignEndianConversion(char* data, char* output, int byteSize, int conversionSize) {
    176176    TRACE1("conversion with size %d\n", conversionSize);
    177177    switch (conversionSize) {
     
    186186    }
    187187    case 2: {
    188         INT8 h;
     188        char h;
    189189        byteSize = byteSize / 2;
    190190        while (byteSize > 0) {
     
    200200    }
    201201    case 3: {
    202         INT8 h;
     202        char h;
    203203        byteSize = byteSize / 3;
    204204        while (byteSize > 0) {
     
    215215    }
    216216    case 4: {
    217         INT8 h1, h2;
     217        char h1, h2;
    218218        byteSize = byteSize / 4;
    219219        while (byteSize > 0) {
     
    312312
    313313
    314 void handleGainAndConversion(DAUDIO_Info* info, UINT8* input, UINT8* output,
     314void handleGainAndConversion(DAUDIO_Info* info, char* input, char* output,
    315315                             int len, float leftGain, float rightGain,
    316316                             int conversionSize) {
     
    585585 jint offset, jint len, jint conversionSize, jfloat leftGain, jfloat rightGain) {
    586586    int ret = -1;
    587 #if USE_DAUDIO == TRUE
    588     UINT8* data;
    589     UINT8* dataOffset;
    590     UINT8* convertedData;
     587#if USE_DAUDIO != TRUE
     588    char* data;
     589    char* dataOffset;
     590    char* convertedData;
    591591    jboolean didCopy;
    592592    DAUDIO_Info* info = (DAUDIO_Info*) (UINT_PTR) id;
     
    599599    if (len == 0) return 0;
    600600    if (info && info->handle) {
    601         data = (UINT8*) ((*env)->GetByteArrayElements(env, jData, &didCopy));
     601        data = ((*env)->GetByteArrayElements(env, jData, &didCopy));
    602602        dataOffset = data;
    603603        dataOffset += (int) offset;
     
    615615                }
    616616                if (!info->conversionBuffer) {
    617                     info->conversionBuffer = (UINT8*) malloc(len);
     617                    info->conversionBuffer = (char*) malloc(len);
    618618                    if (!info->conversionBuffer) {
    619619                        // do not commit the native array
     
    630630                || ((info->channels * info->sampleSizeInBits / 8) != info->frameSize)
    631631                || (info->sampleSizeInBits != 8 && info->sampleSizeInBits != 16)) {
    632                 handleSignEndianConversion((INT8*) dataOffset, (INT8*) convertedData, (int) len,
     632                handleSignEndianConversion(dataOffset, convertedData, (int) len,
    633633                                           (int) conversionSize);
    634634            } else {
     
    639639        }
    640640
    641         ret = DAUDIO_Write(info->handle, (INT8*) convertedData, (int) len);
     641        ret = DAUDIO_Write(info->handle, convertedData, (int) len);
    642642
    643643        // do not commit the native array
  • trunk/openjdk/jdk/src/share/native/java/util/zip/zlib-1.1.3/inftrees.c

    r278 r333  
    153153  register uIntf *p;            /* pointer into c[], b[], or v[] */
    154154  inflate_huft *q;              /* points to current table */
    155   struct inflate_huft_s r;      /* table entry for structure assignment */
     155  struct inflate_huft_s r = {0};/* table entry for structure assignment */
    156156  inflate_huft *u[BMAX];        /* table stack */
    157157  register int w;               /* bits before this table == (l * h) */
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffine.c

    r278 r333  
    155155  mlib_status res;
    156156  mlib_type type;
    157   mlib_s32 nchan, t_ind, kw, kw1;
     157  mlib_s32 nchan, t_ind = 0, kw, kw1;
    158158  mlib_addr align;
    159159  mlib_d64 buff_lcl[BUFF_SIZE / 8];
     
    319319
    320320        break;
     321
     322      default:
     323        break;
    321324    }
    322325
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffineEdge.c

    r278 r333  
    617617        break;
    618618      }
     619
     620    default:
     621      break;
    619622  }
    620623}
     
    643646    case MLIB_DOUBLE:
    644647      MLIB_PROCESS_EDGES(MLIB_EDGE_NEAREST_LINE, mlib_d64);
     648      break;
     649
     650    default:
    645651      break;
    646652  }
     
    692698            MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_u8i, mlib_s16);
    693699            break;
     700
     701          default:
     702            break;
    694703        }
    695704
     
    706715            MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_s16i, mlib_s16);
    707716            break;
     717
     718          default:
     719            break;
    708720        }
    709721
     722        break;
     723
     724      default:
    710725        break;
    711726    }
     
    744759      srcStride >>= 3;
    745760      MLIB_PROCESS_EDGES(MLIB_EDGE_BL, mlib_d64);
     761      break;
     762
     763    default:
    746764      break;
    747765  }
     
    822840            MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_u8i, mlib_s16);
    823841            break;
     842
     843          default:
     844            break;
    824845        }
    825846
     
    836857            MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_s16i, mlib_s16);
    837858            break;
     859
     860          default:
     861            break;
    838862        }
    839863
     864        break;
     865
     866      default:
    840867        break;
    841868    }
     
    896923
    897924      break;
     925
     926    default:
     927      break;
    898928  }
    899929
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageColorTrue2Index.c

    r278 r333  
    26242624              }
    26252625            }
     2626
     2627          default:
     2628            break;
    26262629        }
    26272630
     
    26792682              }
    26802683            }
     2684
     2685          default:
     2686            break;
    26812687        }
    26822688
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConvMxN.c

    r278 r333  
    212212          ret = mlib_convMxNnw_d64(dst_i, src_i, kernel, m, n, dm, dn, cmask);
    213213          break;
     214        default:
     215          break;
    214216      }
    215217    }
     
    221223      case MLIB_EDGE_DST_COPY_SRC:
    222224        mlib_ImageConvCopyEdge(dst_e, src_e, dx_l, dx_r, dy_t, dy_b, cmask);
     225        break;
     226      default:
    223227        break;
    224228    }
     
    280284        mlib_convMxNext_d64(dst_e, src_e, kernel, m, n, dx_l, dx_r, dy_t, dy_b, cmask);
    281285        break;
     286      default:
     287        break;
    282288    }
    283289  }
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c

    r278 r333  
    18701870mlib_status CONV_FUNC_MxN
    18711871{
    1872   DTYPE    *adr_src, *sl, *sp;
    1873   DTYPE    *adr_dst, *dl, *dp;
     1872  DTYPE    *adr_src, *sl, *sp = 0;
     1873  DTYPE    *adr_dst, *dl, *dp = 0;
    18741874  FTYPE    buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)];
    18751875  FTYPE    **buffs = buffs_arr, *buffd;
     
    23332333mlib_status CONV_FUNC_MxN_I
    23342334{
    2335   DTYPE    *adr_src, *sl, *sp;
    2336   DTYPE    *adr_dst, *dl, *dp;
     2335  DTYPE    *adr_src, *sl, *sp = 0;
     2336  DTYPE    *adr_dst, *dl, *dp = 0;
    23372337  mlib_s32 buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)];
    23382338  mlib_s32 *pbuff = buff;
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c

    r278 r333  
    149149/***************************************************************/
    150150#define DEF_VARS(type)                                          \
    151   type     *adr_src, *sl, *sp;                                  \
    152   type     *adr_dst, *dl, *dp;                                  \
     151  type     *adr_src, *sl, *sp = 0;                              \
     152  type     *adr_dst, *dl, *dp = 0;                              \
    153153  FTYPE    *pbuff = buff;                                       \
    154154  mlib_s32 wid, hgt, sll, dll;                                  \
     
    20612061  mlib_s32 k0, k1, k2, k3, k4, k5, k6;
    20622062  mlib_s32 p0, p1, p2, p3, p4, p5, p6, p7;
    2063   DTYPE    *adr_src, *sl, *sp;
    2064   DTYPE    *adr_dst, *dl, *dp;
     2063  DTYPE    *adr_src, *sl, *sp = 0;
     2064  DTYPE    *adr_dst, *dl, *dp = 0;
    20652065  mlib_s32 wid, hgt, sll, dll;
    20662066  mlib_s32 nchannel, chan1;
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_32nw.c

    r278 r333  
    7171#define DEF_VARS(type)                                          \
    7272  GET_SRC_DST_PARAMETERS(type);                                 \
    73   type     *sl, *sp, *sl1, *dl, *dp;                            \
     73  type     *sl, *sp = 0, *sl1, *dl, *dp = 0;                    \
    7474  mlib_d64 *pbuff = buff, *buff0, *buff1, *buff2, *buffT;       \
    7575  mlib_s32 i, j, c;                                             \
     
    7979#define DEF_VARS_MxN(type)                                      \
    8080  GET_SRC_DST_PARAMETERS(type);                                 \
    81   type     *sl, *sp, *dl, *dp;                                  \
     81  type     *sl, *sp = 0, *dl, *dp = 0;                          \
    8282  mlib_d64 *pbuff = buff;                                       \
    8383  mlib_s32 i, j, c
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c

    r278 r333  
    18701870mlib_status CONV_FUNC_MxN
    18711871{
    1872   DTYPE    *adr_src, *sl, *sp;
    1873   DTYPE    *adr_dst, *dl, *dp;
     1872  DTYPE    *adr_src, *sl, *sp = 0;
     1873  DTYPE    *adr_dst, *dl, *dp = 0;
    18741874  FTYPE    buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)];
    18751875  FTYPE    **buffs = buffs_arr, *buffd;
     
    23332333mlib_status CONV_FUNC_MxN_I
    23342334{
    2335   DTYPE    *adr_src, *sl, *sp;
    2336   DTYPE    *adr_dst, *dl, *dp;
     2335  DTYPE    *adr_src, *sl, *sp = 0;
     2336  DTYPE    *adr_dst, *dl, *dp = 0;
    23372337  mlib_s32 buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)];
    23382338  mlib_s32 *pbuff = buff;
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c

    r278 r333  
    150150/***************************************************************/
    151151#define DEF_VARS(type)                                          \
    152   type     *adr_src, *sl, *sp;                                  \
    153   type     *adr_dst, *dl, *dp;                                  \
     152  type     *adr_src, *sl, *sp = 0;                              \
     153  type     *adr_dst, *dl, *dp = 0;                              \
    154154  FTYPE    *pbuff = buff;                                       \
    155155  mlib_s32 wid, hgt, sll, dll;                                  \
     
    20622062  mlib_s32 k0, k1, k2, k3, k4, k5, k6;
    20632063  mlib_s32 p0, p1, p2, p3, p4, p5, p6, p7;
    2064   DTYPE    *adr_src, *sl, *sp;
    2065   DTYPE    *adr_dst, *dl, *dp;
     2064  DTYPE    *adr_src, *sl, *sp = 0;
     2065  DTYPE    *adr_dst, *dl, *dp = 0;
    20662066  mlib_s32 wid, hgt, sll, dll;
    20672067  mlib_s32 nchannel, chan1;
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_D64nw.c

    r278 r333  
    7272  GET_SRC_DST_PARAMETERS(type);                                 \
    7373  type     *sl;                                                 \
    74   type     *dl, *dp;                                            \
    75   mlib_s32 i, j, c
     74  type     *dl, *dp = 0;                                        \
     75  mlib_s32 i = 0, j, c
    7676
    7777/***************************************************************/
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_F32nw.c

    r278 r333  
    7272  GET_SRC_DST_PARAMETERS(type);                                 \
    7373  type     *sl;                                                 \
    74   type     *dl, *dp;                                            \
     74  type     *dl, *dp = 0;                                        \
    7575  mlib_s32 i, j, c
    7676
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c

    r278 r333  
    18701870mlib_status CONV_FUNC_MxN
    18711871{
    1872   DTYPE    *adr_src, *sl, *sp;
    1873   DTYPE    *adr_dst, *dl, *dp;
     1872  DTYPE    *adr_src, *sl, *sp = 0;
     1873  DTYPE    *adr_dst, *dl, *dp = 0;
    18741874  FTYPE    buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)];
    18751875  FTYPE    **buffs = buffs_arr, *buffd;
     
    23332333mlib_status CONV_FUNC_MxN_I
    23342334{
    2335   DTYPE    *adr_src, *sl, *sp;
    2336   DTYPE    *adr_dst, *dl, *dp;
     2335  DTYPE    *adr_src, *sl, *sp = 0;
     2336  DTYPE    *adr_dst, *dl, *dp = 0;
    23372337  mlib_s32 buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)];
    23382338  mlib_s32 *pbuff = buff;
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c

    r278 r333  
    149149/***************************************************************/
    150150#define DEF_VARS(type)                                          \
    151   type     *adr_src, *sl, *sp;                                  \
    152   type     *adr_dst, *dl, *dp;                                  \
     151  type     *adr_src, *sl, *sp = 0;                              \
     152  type     *adr_dst, *dl, *dp = 0;                              \
    153153  FTYPE    *pbuff = buff;                                       \
    154154  mlib_s32 wid, hgt, sll, dll;                                  \
     
    20612061  mlib_s32 k0, k1, k2, k3, k4, k5, k6;
    20622062  mlib_s32 p0, p1, p2, p3, p4, p5, p6, p7;
    2063   DTYPE    *adr_src, *sl, *sp;
    2064   DTYPE    *adr_dst, *dl, *dp;
     2063  DTYPE    *adr_src, *sl, *sp = 0;
     2064  DTYPE    *adr_dst, *dl, *dp = 0;
    20652065  mlib_s32 wid, hgt, sll, dll;
    20662066  mlib_s32 nchannel, chan1;
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c

    r278 r333  
    205205  mlib_u64 *sp;          /* 8-byte aligned start point in src */
    206206  mlib_s32 j;            /* offset of address in dst */
    207   mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFF;
     207  mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFFLL;
    208208  mlib_u64 dmask;
    209   mlib_u64 lsrc, lsrc0, lsrc1, ldst;
     209  mlib_u64 lsrc, lsrc0, lsrc1 = 0, ldst;
    210210  mlib_s32 ls_offset, ld_offset, shift;
    211211
     
    428428  mlib_u64 *sp;          /* 8-byte aligned start point in src */
    429429  mlib_s32 j;            /* offset of address in dst */
    430   mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFF;
     430  mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFFLL;
    431431  mlib_u64 dmask;
    432   mlib_u64 lsrc, lsrc0, lsrc1, ldst;
     432  mlib_u64 lsrc, lsrc0, lsrc1 = 0, ldst;
    433433  mlib_s32 ls_offset, ld_offset, shift;
    434434
  • trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c

    r278 r333  
    335335  mlib_s32       height;                /* for parent image */
    336336  mlib_s32       stride;
    337   mlib_s32       bitoffset;
     337  mlib_s32       bitoffset = 0;
    338338  void           *data;
    339339
     
    424424  mlib_s32   stride   = src -> stride;
    425425  mlib_u8    *data    = src -> data;
    426   mlib_s32   bitoffset;
     426  mlib_s32   bitoffset = 0;
    427427
    428428  data += y * stride;
  • trunk/openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gfx_impl.c

    r278 r333  
    290290           int alphaMask)
    291291{
    292     int i, shift, numBits;
     292    int i, shift = 0, numBits = 0;
    293293
    294294    format->byteOrder = BYTE_ORDER_NATIVE;
  • trunk/openjdk/jdk/src/share/native/sun/java2d/loops/AnyByteBinary.h

    r278 r333  
    151151#define DeclareByteBinaryAlphaLoadData(TYPE, PREFIX) \
    152152    jint *PREFIX ## Lut; \
    153     jint PREFIX ## rgb;
     153    jint PREFIX ## rgb = 0;
    154154
    155155#define InitByteBinaryAlphaLoadData(TYPE, PREFIX, pRasInfo) \
  • trunk/openjdk/jdk/src/share/native/sun/java2d/loops/ByteIndexed.h

    r278 r333  
    200200#define DeclareByteIndexedAlphaLoadData(PREFIX) \
    201201    jint *PREFIX ## Lut; \
    202     jint PREFIX ## rgb;
     202    jint PREFIX ## rgb = 0;
    203203
    204204#define InitByteIndexedAlphaLoadData(PREFIX, pRasInfo) \
  • trunk/openjdk/jdk/src/share/native/sun/java2d/loops/IntArgb.h

    r278 r333  
    119119
    120120#define DeclareIntArgbAlphaLoadData(PREFIX) \
    121     jint PREFIX;
     121    jint PREFIX = 0;
    122122
    123123#define InitIntArgbAlphaLoadData(PREFIX, pRasInfo)
  • trunk/openjdk/jdk/src/share/native/sun/java2d/loops/IntArgbBm.h

    r278 r333  
    130130
    131131#define DeclareIntArgbBmAlphaLoadData(PREFIX) \
    132     jint PREFIX;
     132    jint PREFIX = 0;
    133133
    134134#define InitIntArgbBmAlphaLoadData(PREFIX, pRasInfo)
  • trunk/openjdk/jdk/src/share/native/sun/java2d/loops/IntArgbPre.h

    r278 r333  
    150150
    151151#define DeclareIntArgbPreAlphaLoadData(PREFIX) \
    152     jint PREFIX;
     152    jint PREFIX = 0;
    153153
    154154#define InitIntArgbPreAlphaLoadData(PREFIX, pRasInfo)
  • trunk/openjdk/jdk/src/share/native/sun/java2d/loops/TransformHelper.c

    r309 r333  
    281281    RegionData clipInfo;
    282282    TransformInfo itxInfo;
    283     jint maxlinepix;
    284     TransformHelperFunc *pHelperFunc;
    285     TransformInterpFunc *pInterpFunc;
     283    jint maxlinepix = 0;
     284    TransformHelperFunc *pHelperFunc = NULL;
     285    TransformInterpFunc *pInterpFunc = NULL;
    286286    jdouble xorig, yorig;
    287287    jlong numedges;
  • trunk/openjdk/jdk/src/share/native/sun/java2d/loops/Ushort4444Argb.h

    r278 r333  
    117117
    118118#define DeclareUshort4444ArgbAlphaLoadData(PREFIX) \
    119     jint PREFIX;
     119    jint PREFIX = 0;
    120120
    121121#define InitUshort4444ArgbAlphaLoadData(PREFIX, pRasInfo)
  • trunk/openjdk/jdk/src/share/native/sun/java2d/loops/UshortIndexed.h

    r278 r333  
    168168#define DeclareUshortIndexedAlphaLoadData(PREFIX) \
    169169    jint *PREFIX ## Lut; \
    170     jint PREFIX ## rgb;
     170    jint PREFIX ## rgb = 0;
    171171
    172172#define InitUshortIndexedAlphaLoadData(PREFIX, pRasInfo) \
  • trunk/openjdk/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c

    r278 r333  
    629629    GLfloat foff;
    630630    GLint loc;
    631     void *bands[4];
     631    void *bands[4] = {0};
    632632    int i;
    633633    jint flags = 0;
  • trunk/openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_keymgmt.c

    r278 r333  
    218218    CK_OBJECT_HANDLE ckWrappingKeyHandle;
    219219    CK_OBJECT_HANDLE ckKeyHandle;
    220     jbyteArray jWrappedKey;
     220    jbyteArray jWrappedKey = 0;
    221221    CK_RV rv;
    222222    CK_BYTE BUF[MAX_STACK_BUFFER_LEN];
  • trunk/openjdk/jdk/src/windows/bin/java_md.c

    r294 r333  
    403403        && type == REG_SZ
    404404        && (size < (unsigned int)bufsize)) {
    405         if (RegQueryValueEx(key, name, 0, 0, buf, &size) == 0) {
     405        if (RegQueryValueEx(key, name, 0, 0, (LPBYTE)buf, &size) == 0) {
    406406            return JNI_TRUE;
    407407        }
     
    693693        JLI_MemFree(best);
    694694        len = MAXNAMELEN;
    695         if (RegQueryValueEx(ver_key, "JavaHome", NULL, NULL, (LPBYTE)name, &len)
     695        if (RegQueryValueEx(ver_key, "JavaHome", NULL, NULL, (LPBYTE)name,
     696                            (LPDWORD)&len)
    696697          != ERROR_SUCCESS) {
    697698            if (ver_key != NULL)
     
    975976        char    *p;
    976977        char    *np;
    977         char    *ocl;
     978        const char *ocl;
    978979        char    *ccl;
    979980        char    *unquoted;
     
    11911192    if (thread_handle) {
    11921193      WaitForSingleObject(thread_handle, INFINITE);
    1193       GetExitCodeThread(thread_handle, &rslt);
     1194      GetExitCodeThread(thread_handle, (LPDWORD)&rslt);
    11941195      CloseHandle(thread_handle);
    11951196    } else {
  • trunk/openjdk/jdk/src/windows/instrument/FileSystemSupport_md.c

    r278 r333  
    2727#include <string.h>
    2828#include <malloc.h>
     29
     30#ifdef __EMX__
     31#include <strings.h> // strcasecmp
     32#endif
    2933
    3034#include "FileSystemSupport_md.h"
  • trunk/openjdk/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp

    r278 r333  
    795795    DSCBUFFERDESC dscbdesc;
    796796#endif
    797     HRESULT res;
     797    HRESULT res = 0;
    798798    WAVEFORMATEXTENSIBLE format;
    799799    void* buffer;
     
    10761076                    DWORD* playCursor, DWORD* writeCursor,
    10771077                    int* bufferSize, BOOL fromPlayCursor) {
    1078     int available;
     1078    int available = 0;
    10791079    int newReadPos;
    10801080
  • trunk/openjdk/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_Util.c

    r278 r333  
    9494    SysExQueue* sysex;
    9595    int i;
    96     UBYTE* dataPtr;
     96    char* dataPtr;
    9797    int structSize = sizeof(SysExQueue) + ((count - 1) * sizeof(MIDIHDR));
    9898
     
    116116
    117117    // set up headers
    118     dataPtr = preAllocatedMem;
     118    dataPtr = (char*)preAllocatedMem;
    119119    for (i=0; i<count; i++) {
    120120        sysex->header[i].lpData = dataPtr;
  • trunk/openjdk/jdk/src/windows/native/java/net/NetworkInterface.c

    r278 r333  
    332332         */
    333333        strcpy(curr->name, dev_name);
    334         strncpy(curr->displayName, ifrowP->bDescr, ifrowP->dwDescrLen);
     334        strncpy(curr->displayName, (char*)ifrowP->bDescr, ifrowP->dwDescrLen);
    335335        curr->displayName[ifrowP->dwDescrLen] = '\0';
    336336        curr->dwIndex = ifrowP->dwIndex;
  • trunk/openjdk/jdk/src/windows/native/java/net/SocketOutputStream.c

    r278 r333  
    3131#include <malloc.h>
    3232#include <sys/types.h>
    33 
    34 #ifdef __EMX__
    35 #define min(a, b) ((a) < (b) ? (a) : (b))
    36 #endif
    3733
    3834#include "java_net_SocketOutputStream.h"
  • trunk/openjdk/jdk/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c

    r278 r333  
    430430    jobject fd1Obj = (*env)->GetObjectField(env, this, pdsi_fd1ID);
    431431
    432     int fd, fd1, family;
     432    int fd, fd1 = -1, family;
    433433    int ipv6_supported = ipv6_available();
    434434
     
    935935    jint packetBufferOffset, packetBufferLen;
    936936
    937     int fd, fd1, fduse, nsockets=0, errorCode;
     937    int fd = -1, fd1 = -1, fduse, nsockets=0, errorCode;
    938938    int port;
    939939    jbyteArray data;
     
    12101210     * must be called prior to receive() so that fduse can be set.
    12111211     */
    1212     int fd, fd1, fduse, errorCode;
     1212    int fd = -1, fd1 = -1, fduse, errorCode;
    12131213    jbyteArray data;
    12141214
  • trunk/openjdk/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c

    r278 r333  
    196196    /* family and localport are int fields of iaObj */
    197197    int family;
    198     jint fd, fd1=-1;
     198    jint fd = -1, fd1 = -1;
    199199    jint len;
    200200    int  ipv6_supported = ipv6_available();
     
    269269        }
    270270    } else {
    271         int optval;
     271        u_long optval;
    272272        int optlen = sizeof(optval);
    273273
     
    405405    jobject fdObj, fd1Obj;
    406406    /* fd is an int field on fdObj */
    407     int fd, fd1, len;
     407    int fd = -1, fd1 = -1, len;
    408408    int ipv6_supported = ipv6_available();
    409409
     
    524524    jobject address;
    525525    /* fdObj's int fd field */
    526     int fd, fd1;
     526    int fd = -1, fd1;
    527527    SOCKETADDRESS addr; int addrlen;
    528528
     
    790790Java_java_net_TwoStacksPlainSocketImpl_socketAvailable(JNIEnv *env, jobject this) {
    791791
    792     jint available = -1;
     792    u_long available = -1;
    793793    jint res;
    794794    jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID);
     
    10231023    int level, optname, optlen;
    10241024    union {
    1025         int i;
     1025        u_long i;
    10261026        struct linger ling;
    10271027    } optval;
  • trunk/openjdk/jdk/src/windows/native/java/net/net_util_md.c

    r278 r333  
    590590    if (family == AF_INET) {
    591591        struct sockaddr_in *him = (struct sockaddr_in *)addr;
    592         printf ("AF_INET: port %d: %x\n", ntohs(him->sin_port),
    593                                           ntohl(him->sin_addr.s_addr));
     592        printf ("AF_INET: port %d: %lx\n", ntohs(him->sin_port),
     593                                            ntohl(him->sin_addr.s_addr));
    594594    } else {
    595595        int i;
     
    597597        printf ("AF_INET6 ");
    598598        printf ("port %d ", ntohs (a->sin6_port));
    599         printf ("flow %d ", a->sin6_flowinfo);
     599        printf ("flow %ld ", a->sin6_flowinfo);
    600600        printf ("addr ");
    601601        for (i=0; i<7; i++) {
     
    603603        }
    604604        printf ("%04x", ntohs(in->s6_words[7]));
    605         printf (" scope %d\n", a->sin6_scope_id);
     605        printf (" scope %ld\n", a->sin6_scope_id);
    606606    }
    607607}
  • trunk/openjdk/jdk/src/windows/native/java/net/net_util_md.h

    r278 r333  
    342342extern jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout);
    343343extern int NET_Socket (int domain, int type, int protocol);
     344extern void NET_ThrowSocketException(JNIEnv *env, char* msg);
    344345extern void NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
    345346                                         const char *defaultDetail);
  • trunk/openjdk/jdk/src/windows/native/sun/java2d/j2d_md.h

    r278 r333  
    2727#define j2d_md_h_Included
    2828
     29#ifdef _MSC_VER
    2930#ifndef DEBUG
    3031#pragma optimize("t", on)
     32#endif
    3133#endif
    3234
  • trunk/openjdk/jdk/src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.c

    r278 r333  
    202202    int pixfmts[32];
    203203    int chosenPixFmt = 0;
    204     int nfmts, i;
     204    UINT nfmts, i;
    205205
    206206    // this is the initial minimum value for the combined depth+stencil size
  • trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/GDIRenderer.cpp

    r278 r333  
    321321    }
    322322
    323     long sx, sy, ex, ey;
     323    jint sx, sy, ex, ey;
    324324    if (angleExtent >= 360 || angleExtent <= -360) {
    325325        sx = ex = x + w;
     
    594594        return;
    595595    }
    596     long sx, sy, ex, ey;
    597     int angleEnd;
     596    jint sx, sy, ex, ey;
     597    jint angleEnd;
    598598    if (angleExtent < 0) {
    599599        angleEnd = angleStart;
  • trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/Win32OffScreenSurfaceData.cpp

    r278 r333  
    467467    if (wsdo->lockFlags & SD_LOCK_LUT) {
    468468        pRasInfo->lutBase =
    469             (long *) wsdo->device->GetSystemPaletteEntries();
     469            (jint *) wsdo->device->GetSystemPaletteEntries();
    470470        pRasInfo->lutSize = 256;
    471471    } else {
  • trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/Win32SurfaceData.cpp

    r278 r333  
    940940    if (wsdo->lockFlags & SD_LOCK_LUT) {
    941941        pRasInfo->lutBase =
    942             (long *) wsdo->device->GetSystemPaletteEntries();
     942            (jint *) wsdo->device->GetSystemPaletteEntries();
    943943        pRasInfo->lutSize = 256;
    944944    } else {
  • trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawObject.cpp

    r278 r333  
    439439
    440440    DXSurface *dxSurface;
    441     DWORD dwFlags, ddsCaps;
     441    DWORD dwFlags, ddsCaps = 0;
    442442
    443443    // Create the offscreen surface
  • trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawUtils.cpp

    r278 r333  
    18001800        break;
    18011801    default:
    1802         sprintf(buffer, "DirectX Error Unknown 0x%x", errNum);
    1803         break;
    1804     }
    1805 
    1806 }
     1802        sprintf(buffer, "DirectX Error Unknown 0x%lx", errNum);
     1803        break;
     1804    }
     1805
     1806}
  • trunk/openjdk/jdk/src/windows/native/sun/management/FileSystemImpl.c

    r278 r333  
    209209static ACL* getFileDACL(JNIEnv* env, SECURITY_DESCRIPTOR* sd) {
    210210    ACL *acl;
    211     int defaulted, present;
     211    BOOL defaulted, present;
    212212
    213213    if (!(*GetSecurityDescriptorDacl_func)(sd, &present, &acl, &defaulted)) {
  • trunk/openjdk/jdk/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c

    r278 r333  
    3131#include <time.h>
    3232#include <assert.h>
     33
     34#ifdef __WIN32OS2__
     35#include <string.h>
     36#endif
    3337
    3438#include "jni_util.h"
  • trunk/openjdk/jdk/src/windows/native/sun/net/spi/DefaultProxySelector.c

    r278 r333  
    2525
    2626#include <windows.h>
     27
     28#ifdef __WIN32OS2__
     29#include <string.h>
     30#endif
     31
    2732#include "jni.h"
    2833#include "jni_util.h"
  • trunk/openjdk/jdk/src/windows/native/sun/net/www/protocol/http/NTLMAuthSequence.c

    r278 r333  
    6666{
    6767    OSVERSIONINFO   version;
    68     UCHAR libName[MAX_PATH];
     68    char libName[MAX_PATH];
    6969
    7070    ntlm_ctxHandleID = (*env)->GetFieldID(env, clazz, "ctxHandle", "J");
     
    196196    CtxtHandle      *newContext;
    197197    TimeStamp            ltime;
    198     jbyteArray       result;
     198    jbyteArray       result = 0;
    199199
    200200
  • trunk/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsSelectorImpl.c

    r309 r333  
    195195{
    196196    char bytes[WAKEUP_SOCKET_BUF_SIZE];
    197     long bytesToRead;
     197    u_long bytesToRead;
    198198
    199199    /* Drain socket */
  • trunk/openjdk/jdk/src/windows/native/sun/security/mscapi/security.cpp

    r278 r333  
    641641    HCRYPTKEY hKeyPair;
    642642    DWORD dwFlags = (keySize << 16) | CRYPT_EXPORTABLE;
    643     jobject keypair;
     643    jobject keypair = NULL;
    644644    const char* pszKeyContainerName = NULL; // UUID
    645645
     
    738738        } else {
    739739            char buffer[64];
    740             if (sprintf(buffer, "%lu", dwAlgId)) {
     740            if (sprintf(buffer, "%u", dwAlgId)) {
    741741                return env->NewStringUTF(buffer);
    742742            }
     
    14011401    jbyteArray blob = NULL;
    14021402    DWORD dwBlobLen;
    1403     BYTE* pbKeyBlob;
     1403    BYTE* pbKeyBlob = NULL;
    14041404
    14051405    __try
  • trunk/openjdk/jdk/src/windows/native/sun/security/pkcs11/j2secmod_md.h

    r278 r333  
    2626#include <windows.h>
    2727
     28#ifdef __EMX__
     29#define DECLSPEC_DLLIMPORT
     30#else
     31#define DECLSPEC_DLLIMPORT __declspec(dllimport)
     32#endif
     33
    2834// in nss.h:
    2935// extern PRBool NSS_VersionCheck(const char *importedVersion);
    3036// extern SECStatus NSS_Init(const char *configdir);
    31 typedef int __declspec(dllimport) (*FPTR_VersionCheck)(const char *importedVersion);
    32 typedef int __declspec(dllimport) (*FPTR_Init)(const char *configdir);
     37typedef int DECLSPEC_DLLIMPORT (*FPTR_VersionCheck)(const char *importedVersion);
     38typedef int DECLSPEC_DLLIMPORT (*FPTR_Init)(const char *configdir);
    3339
    3440// in secmod.h
     
    3844//extern SECMODModuleList *SECMOD_GetDBModuleList(void);
    3945
    40 typedef void __declspec(dllimport) *(*FPTR_LoadModule)(char *moduleSpec, void *parent, int recurse);
    41 typedef char __declspec(dllimport) **(*FPTR_GetModuleSpecList)(void *module);
    42 typedef void __declspec(dllimport) *(*FPTR_GetDBModuleList)(void);
     46typedef void DECLSPEC_DLLIMPORT *(*FPTR_LoadModule)(char *moduleSpec, void *parent, int recurse);
     47typedef char DECLSPEC_DLLIMPORT **(*FPTR_GetModuleSpecList)(void *module);
     48typedef void DECLSPEC_DLLIMPORT *(*FPTR_GetDBModuleList)(void);
  • trunk/openjdk/jdk/src/windows/native/sun/security/pkcs11/wrapper/p11_md.h

    r2 r333  
    5959#include <windows.h>
    6060
     61#ifdef __EMX__
     62#define DECLSPEC_DLLIMPORT
     63#else
     64#define DECLSPEC_DLLIMPORT __declspec(dllimport)
     65#endif
     66
    6167/* statement according to PKCS11 docu */
    6268#pragma pack(push, cryptoki, 1)
     
    6470/* definitions according to PKCS#11 docu for Win32 environment */
    6571#define CK_PTR *
    66 #define CK_DEFINE_FUNCTION(returnType, name) returnType __declspec(dllexport) name
    67 #define CK_DECLARE_FUNCTION(returnType, name) returnType __declspec(dllimport) name
    68 #define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType __declspec(dllimport) (* name)
     72#define CK_DEFINE_FUNCTION(returnType, name) returnType DECLSPEC_DLLIMPORT name
     73#define CK_DECLARE_FUNCTION(returnType, name) returnType DECLSPEC_DLLIMPORT name
     74#define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType DECLSPEC_DLLIMPORT (* name)
    6975#define CK_CALLBACK_FUNCTION(returnType, name) returnType (* name)
    7076#ifndef NULL_PTR
  • trunk/openjdk/jdk/src/windows/native/sun/windows/GDIHashtable.cpp

    r278 r333  
    135135                                                               UINT nSecondThreshold,
    136136                                                               UINT nDestroyPeriod) :
     137  m_nCounter(0),
    137138  m_nFirstThreshold(nFirstThreshold),
    138139  m_nSecondThreshold(nSecondThreshold),
    139140  m_nDestroyPeriod(nDestroyPeriod),
    140   m_nCounter(0),
    141141  m_bBatchingEnabled(TRUE) {
    142142    load_rsrc32_procs();
  • trunk/openjdk/jdk/src/windows/native/sun/windows/ShellFolder2.cpp

    r278 r333  
    231231    if (FAILED(hr)) {
    232232        char c[64];
    233         sprintf(c, "Could not initialize COM: HRESULT=0x%08X", hr);
     233        sprintf(c, "Could not initialize COM: HRESULT=0x%08lX", hr);
    234234        JNU_ThrowInternalError(env, c);
    235235    }
     
    625625    STRRET strret;
    626626    OLECHAR olePath[MAX_PATH]; // wide-char version of path name
    627     LPWSTR wstr;
     627    LPWSTR wstr = NULL;
    628628
    629629    IShellFolder* pParent = (IShellFolder*)parentIShellFolder;
     
    959959            // Extract the color bitmap
    960960            int nBits = iconSize * iconSize;
    961             long colorBits[1024];
     961            jint colorBits[1024];
    962962            GetDIBits(dc, iconInfo.hbmColor, 0, iconSize, colorBits, &bmi, DIB_RGB_COLORS);
    963963            // XP supports alpha in some icons, and depending on device.
     
    10111011    HBITMAP hBitmap = NULL;
    10121012    BITMAP bm;
    1013     HINSTANCE libComCtl32;
     1013    HINSTANCE libComCtl32 = NULL;
    10141014    HINSTANCE libShell32;
    10151015
     
    10521052    int numPixels = bm.bmWidth * bm.bmHeight;
    10531053    //long colorBits[192 * 16];
    1054     long *colorBits = (long*)safe_Malloc(numPixels * sizeof(long));
     1054    jint *colorBits = (jint*)safe_Malloc(numPixels * sizeof(jint));
    10551055    if (GetDIBits(dc, hBitmap, 0, bm.bmHeight, colorBits, &bmi, DIB_RGB_COLORS) == 0) {
    10561056        return NULL;
  • trunk/openjdk/jdk/src/windows/native/sun/windows/UnicowsLoader.cpp

    r278 r333  
    4646HMODULE UnicowsLoader::hmodUnicows = NULL;
    4747
     48extern "C"
     49{
    4850// MSLU loader entry point, which is called when the module
    4951// is initialized.
    50 extern "C" HMODULE (__stdcall *_PfnLoadUnicows)(void) =
     52HMODULE (__stdcall *_PfnLoadUnicows)(void) =
    5153        &UnicowsLoader::LoadUnicows;
    5254
    5355// Overriede APIs that are not supported by MSLU.
    54 extern "C" FARPROC Unicows_GetPrinterW =
     56FARPROC Unicows_GetPrinterW =
    5557        (FARPROC)&UnicowsLoader::GetPrinterWImpl;
    56 extern "C" FARPROC Unicows_EnumPrintersW =
     58FARPROC Unicows_EnumPrintersW =
    5759        (FARPROC)&UnicowsLoader::EnumPrintersWImpl;
     60}
    5861
    5962HMODULE __stdcall UnicowsLoader::LoadUnicows(void)
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Component.cpp

    r309 r333  
    52505250    jint wheelAmt = 0;
    52515251    jint id = (env)->GetIntField(mouseEvent, AwtAWTEvent::idID);
    5252     UINT message;
     5252    UINT message = 0;
    52535253    switch (id) {
    52545254      case java_awt_event_MouseEvent_MOUSE_PRESSED: {
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp

    r278 r333  
    367367
    368368    BOOL fontSmoothing = FALSE, settingsChanged;
    369     UINT fontSmoothingType=0, fontSmoothingContrast=0, subPixelOrder;
     369    UINT fontSmoothingType=0, fontSmoothingContrast=0, subPixelOrder=0;
    370370
    371371    if (firstTime) {
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_DnDDS.cpp

    r278 r333  
    11781178    m_parent = parent;
    11791179
    1180     m_buffer = (signed char *)safe_Calloc(sizeof(signed char), m_blen = blen);
     1180    m_buffer = (jbyte *)safe_Calloc(sizeof(jbyte), m_blen = blen);
    11811181
    11821182    env->GetByteArrayRegion(buffer, 0, blen, m_buffer);
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_DnDDS.h

    r278 r333  
    207207                AwtDragSource*   m_parent;
    208208
    209                 signed   char*   m_buffer;
     209                jbyte*           m_buffer;
    210210                unsigned int     m_off;
    211211                unsigned int     m_blen;
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Font.cpp

    r278 r333  
    891891
    892892            for (; len; len--) {
    893                 result += widths[*pStr++];
     893                result += widths[(unsigned char)*pStr++];
    894894            }
    895895        } catch (...) {
     
    11991199
    12001200LONG AwtFontCache::IncRefCount(Item* item){
    1201     LONG    newVal;
     1201    LONG    newVal = 0;
    12021202
    12031203    if(NULL != item){
     
    12081208
    12091209LONG AwtFontCache::DecRefCount(Item* item){
    1210     LONG    newVal;
     1210    LONG    newVal = 0;
    12111211
    12121212    if(NULL != item){
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Frame.cpp

    r278 r333  
    147147    PDATA pData;
    148148    HWND hwndParent = NULL;
    149     AwtFrame* frame;
     149    AwtFrame* frame = NULL;
    150150    jclass cls = NULL;
    151151    jclass inputMethodWindowCls = NULL;
     
    872872MsgRouting AwtFrame::WmActivate(UINT nState, BOOL fMinimized, HWND opposite)
    873873{
    874     jint type;
     874    jint type = 0;
    875875    BOOL doActivateFrame = TRUE;
    876876
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Label.cpp

    r278 r333  
    125125        if (env->EnsureLocalCapacity(3) < 0)
    126126            return;
    127         long x,y;
     127        long x = 0, y;
    128128        SIZE size;
    129129
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Menu.h

    r278 r333  
    8080    /*for multifont menu */
    8181    BOOL IsTopMenu();
    82     virtual AwtMenuItem* GetItem(jobject target, long index);
     82    virtual AwtMenuItem* GetItem(jobject target, jint index);
    8383
    8484    virtual int CountItem(jobject target);
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp

    r278 r333  
    915915    HGLOBAL hDevNames = AwtPrintControl::getPrintHDName(env, self);
    916916    if (hDevNames != NULL) {
    917         DWORD dmFields;
     917        DWORD dmFields = 0;
    918918        DEVNAMES *devnames = (DEVNAMES *)::GlobalLock(hDevNames);
    919919
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TextArea.cpp

    r278 r333  
    114114        {
    115115            /* Adjust style for scrollbar visibility and word wrap  */
    116           DWORD scroll_style;
     116          DWORD scroll_style = 0;
    117117          jint scrollbarVisibility =
    118118              env->GetIntField(target, AwtTextArea::scrollbarVisibilityID);
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp

    r278 r333  
    775775    JNI_CHECK_PEER_RETURN_NULL(self);
    776776    AwtComponent* c = (AwtComponent*)pData;
    777 /*
    778     int line = 0;
    779     int lineIndex = 0;
    780     while (lineIndex < i) {
    781         lineIndex = c->SendMessage(EM_LINEINDEX, 1 + line++);
    782     }
    783     line--;     // line is now the line which contains our character at position 'i'
    784     int offsetIndex = i - lineIndex;    // offsetIndex is now distance in on the line
    785 * /
     777
     778//    int line = 0;
     779//    int lineIndex = 0;
     780//    while (lineIndex < i) {
     781//        lineIndex = c->SendMessage(EM_LINEINDEX, 1 + line++);
     782//    }
     783//    line--;     // line is now the line which contains our character at position 'i'
     784//    int offsetIndex = i - lineIndex;    // offsetIndex is now distance in on the line
     785
    786786    POINT p;
    787787
     
    793793    jint charHeight;
    794794
    795 /*
    796     HFONT font = c->SendMessage(WM_GETFONT);
    797     if (GetCharWidth32(c->hdc, i, i, &charWidth) != 0) {        // [[[FIXME]]] need to get hDC!
    798 
    799         JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
    800         jobject rect = JNU_NewObjectByName(env, "java/awt/Rectangle", "(IIII)V",
    801                                            (jint) p.x, (jint) p.y, charWidth, charHeight);
    802 
    803         return rect;
    804     }
    805 * /
     795//    HFONT font = c->SendMessage(WM_GETFONT);
     796//    if (GetCharWidth32(c->hdc, i, i, &charWidth) != 0) {        // [[[FIXME]]] need to get hDC!
     797//
     798//        JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
     799//        jobject rect = JNU_NewObjectByName(env, "java/awt/Rectangle", "(IIII)V",
     800//                                           (jint) p.x, (jint) p.y, charWidth, charHeight);
     801//
     802//        return rect;
     803//    }
     804
    806805    return (jobject) 0;
    807806
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp

    r278 r333  
    412412#endif
    413413
    414         //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
     414        ///////////////////////////////////////////////////////////////////////////
    415415        // Bugs 4032109, 4047966, and 4071991 to fix AWT
    416416        //      crash in 16 color display mode.  16 color mode is supported.  Less
     
    583583
    584584    jobject gcomponent = env->NewGlobalRef((jobject)component);
    585     jobject gparent;
     585    jobject gparent = 0;
    586586    if (isParentALocalReference) gparent = env->NewGlobalRef((jobject)parent);
    587587    ComponentCreatePacket ccp = { gcomponent,
Note: See TracChangeset for help on using the changeset viewer.