Running lint on the make/java/instrument code: cd <your workspace>/jdk/make/java/instrument gmake lint.clean gmake lint.errors [...] /devtools/sparc/SUNWspro/SS11/bin/lint -errsecurity=core -errhdr=%user -v -x -u -errfmt=simple -Xarch=v8 -DTRIMMED -DNO_JPLIS_LOGGING -Dsparc -D__solaris__ -D_REENTRANT -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS -I. -I../../../build/solaris-sparc/tmp/sun/sun.instrument/instrument/CClassHeaders -I../../../src/solaris/javavm/export -I../../../src/share/javavm/export -I../../../src/share/javavm/include -I../../../src/solaris/javavm/include -I../../../src/share/instrument -I../../../src/solaris/instrument -I../../../src/solaris/native/java/io -I../../../src/share/bin -I../../../src/solaris/bin -I../../../src/share/native/common -I../../../src/solaris/native/common -I../../../src/share/native/sun/instrument -I../../../src/solaris/native/sun/instrument -dirout=../../../build/solaris-sparc/tmp/sun/sun.instrument/instrument/obj -c ../../../src/share/instrument/JPLISAgent.c illegal option -Xarch=v8 "../../../src/share/instrument/JPLISAgent.c", line 286 [16]: warning: expression, or sub-expression, has null effect "../../../src/share/instrument/JPLISAgent.c", line 286 [16]: warning: equality operator "==" found where assignment "=" expected 277 jvmtierror = (*jvmtienv)->SetEnvironmentLocalStorage( 278 jvmtienv, 279 &(agent->mNormalEnvironment)); 280 jplis_assert(jvmtierror == JVMTI_ERROR_NONE); 281 282 /* check what capabilities are available */ 283 checkCapabilities(agent); 284 285 /* check phase - if live phase then we don't need the VMInit event */ 286 jvmtierror == (*jvmtienv)->GetPhase(jvmtienv, &phase); 287 jplis_assert(jvmtierror == JVMTI_ERROR_NONE); 288 if (phase == JVMTI_PHASE_LIVE) { 289 return JPLIS_INIT_ERROR_NONE; 290 } 291 292 /* now turn on the VMInit event */ 293 if ( jvmtierror == JVMTI_ERROR_NONE ) { 294 jvmtiEventCallbacks callbacks; Statement 286 should be an assignment. The assert at 287 is not checking the results of the GetPhase() call. The code works most of the time because GetPhase() is successful and sets &phase as a side-effect.
|