Hi All, Running clang in static analyser mode on darwin (x86-64) resulted in these messages: (http://clang-analyzer.llvm.org/)
Maybe some of them are worth to verify. --- ../../../ppcore.c:1785:21: warning: Dereference of null pointer pState->pMap[ HB_PP_HASHID( pMatch ) ] |= id; ^ ../../../../../include/hbpp.h:407:43: note: instantiated from: #define HB_PP_HASHID(t) ( ( UCHAR ) HB_PP_UPPER( (t)->value[0] ) ) ^ ../../../../../include/hbpp.h:455:34: note: instantiated from: #define HB_PP_UPPER(c) HB_TOUPPER( c ) ^ ../../../ppcore.c:1785:21: note: instantiated from: pState->pMap[ HB_PP_HASHID( pMatch ) ] |= id; ^ ../../../../../include/hbpp.h:407:43: note: instantiated from: #define HB_PP_HASHID(t) ( ( UCHAR ) HB_PP_UPPER( (t)->value[0] ) ) ^ ../../../ppcore.c:1785:21: note: instantiated from: pState->pMap[ HB_PP_HASHID( pMatch ) ] |= id; ^ ../../../../../include/hbpp.h:407:61: note: instantiated from: #define HB_PP_HASHID(t) ( ( UCHAR ) HB_PP_UPPER( (t)->value[0] ) ) ^ ../../../ppcore.c:3420:47: warning: Dereference of null pointer if( HB_PP_TOKEN_ISEOC( pToken ) && pToken->pNext && ^ ../../../ppcore.c:3469:17: warning: Dereference of null pointer curtype = HB_PP_TOKEN_TYPE( pToken->type ); ^ ../../../ppcore.c:3469:43: note: instantiated from: curtype = HB_PP_TOKEN_TYPE( pToken->type ); ^ 3 diagnostics generated. ../../../errint.c:69:8: warning: Dereference of null pointer *pGPF = 0; ^ 1 diagnostic generated. ../../../hbcrc.c:219:14: warning: Result of operation is undefined. mask = ( HB_LONG ) 1 << ( bits - 1 ); ^ 1 diagnostic generated. ../../../hbstrfmt.c:220:17: warning: Dereference of null pointer if( HB_IS_NUMERIC( pItem ) ) ^ ../../../../../include/hbapi.h:214:35: note: instantiated from: #define HB_IS_NUMERIC( p ) ( ( HB_ITEM_TYPERAW( p ) & HB_IT_NUMERIC ) != 0 ) ^ ../../../../../include/hbvmpub.h:170:36: note: instantiated from: # define HB_ITEM_TYPERAW( p ) ( * ( HB_TYPE * ) ( p ) ) ^ ../../../hbstrfmt.c:325:17: warning: Dereference of null pointer if( HB_IS_NUMERIC( pItem ) ) ^ ../../../../../include/hbapi.h:214:35: note: instantiated from: #define HB_IS_NUMERIC( p ) ( ( HB_ITEM_TYPERAW( p ) & HB_IT_NUMERIC ) != 0 ) ^ ../../../../../include/hbvmpub.h:170:36: note: instantiated from: # define HB_ITEM_TYPERAW( p ) ( * ( HB_TYPE * ) ( p ) ) ^ 2 diagnostics generated. ../../../gtcrs.c:399:20: warning: Although the value stored to 'pid' is used in the enclosing expression, the value is never actually read from 'pid' while ( ( pid = waitpid( -1, &stat, WNOHANG ) ) > 0 ) ; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../gtcrs.c:780:4: warning: Value stored to 'nKey' is never read nKey = esc = n = i = 0; ^ ~~~~~~~~~~~~~~~ ../../../gtcrs.c:861:10: warning: Value stored to 'nKey' is never read nKey = 0; ^ ~ 3 diagnostics generated. ../../../gtstd.c:141:20: warning: Although the value stored to 'pid' is used in the enclosing expression, the value is never actually read from 'pid' while ( ( pid = waitpid( -1, &stat, WNOHANG ) ) > 0 ) ; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 diagnostic generated. ../../../gttrm.c:617:19: warning: Although the value stored to 'pid' is used in the enclosing expression, the value is never actually read from 'pid' while( ( pid = waitpid( -1, &stat, WNOHANG ) ) > 0 ) { ; } ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../gttrm.c:1347:4: warning: Value stored to 'nKey' is never read nKey = esc = n = i = 0; ^ ~~~~~~~~~~~~~~~ ../../../gttrm.c:1427:10: warning: Value stored to 'nKey' is never read nKey = 0; ^ ~ 3 diagnostics generated. ../../../gtxwc.c:3333:7: warning: Value stored to 'whiteColor' is never read whiteColor = WhitePixel( wnd->dpy, DefaultScreen( wnd->dpy ) ); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 diagnostic generated. ../../../wafunc.c:864:11: warning: Dereference of null pointer if( * szField == '\0' ) ^ 1 diagnostic generated. ../../../dbf1.c:3262:10: warning: Dereference of null pointer pBuffer[ ulSize - 2 ] = '\r'; ^ ../../../dbf1.c:2983:19: warning: Dereference of null pointer pThisField->bFieldFlags = ( BYTE ) pField->uiFlags; ^ ../../../dbf1.c:3259:10: warning: Dereference of null pointer pBuffer[ ulSize - 1 ] = '\r'; ^ ../../../dbf1.c:3190:19: warning: Dereference of null pointer pThisField->bType = '0'; ^ 4 diagnostics generated. ../../../dbfcdx1.c:2837:26: warning: Dereference of null pointer pPtr[ ( iKeys - 1 ) * iLen + j ] == pbKey[ j ]; j++ ) {} ^ ../../../dbfcdx1.c:2883:37: warning: Dereference of null pointer bMax = iLen - 6 - pPtr[ iLen - 1 ]; ^ ../../../dbfcdx1.c:2827:84: warning: Dereference of null pointer iSize += iLen - 6 - ( j == 0 ? 0 : pPtr[ ( j + 1 ) * iLen - 2 ] ) - pPtr[ ( j + 1 ) * iLen - 1 ]; ^ 3 diagnostics generated. ../../../bmdbfcdx.c:2864:84: warning: Dereference of null pointer iSize += iLen - 6 - ( j == 0 ? 0 : pPtr[ ( j + 1 ) * iLen - 2 ] ) - pPtr[ ( j + 1 ) * iLen - 1 ]; ^ ../../../bmdbfcdx.c:2874:26: warning: Dereference of null pointer pPtr[ ( iKeys - 1 ) * iLen + j ] == pbKey[ j ]; j++ ) {} ^ ../../../bmdbfcdx.c:2920:37: warning: Dereference of null pointer bMax = iLen - 6 - pPtr[ iLen - 1 ]; ^ 3 diagnostics generated. ../../../hb_btree.c:517:19: warning: Dereference of null pointer if ( thisptr->ulPage != page && thisptr->IsDirty ) ^ ../../../hb_btree.c:531:22: warning: Dereference of null pointer else if ( thisptr->IsDirty ) ^ ../../../hb_btree.c:781:19: warning: Dereference of null pointer if ( thisptr->prev ) thisptr->prev->next = thisptr->next; ^ 3 diagnostics generated. ../../../sqlmix.c:1110:22: warning: Dereference of null pointer if ( pNode->Leaf ) ^ ../../../sqlmix.c:1221:22: warning: Dereference of null pointer pTag->CurKey = MIX_KEY( pTag, pNode, uiPos ); ^ ../../../sqlmix.c:71:49: note: instantiated from: ( (PMIXKEY) & ( (BYTE*) (node) ) [ ( (node)->Leaf ? sizeof( MIXNODELEAF ) : sizeof( MIXNODE ) ) + (index) * (tag)->uiTotalLen ] ) ^ 2 diagnostics generated. --- Brgds, Viktor
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour