use clang instead of gcc for ndk builds

And make changes to C code to fix resulting warning. The .so file
basically works but is not thoroughly tested.
This commit is contained in:
Eric House 2016-10-25 06:09:40 -07:00
parent a6992c373f
commit 1a830fbff2
9 changed files with 15 additions and 14 deletions

View file

@ -104,13 +104,13 @@ andCountSpecials( AndDictionaryCtxt* ctxt )
static XP_Bool
andMakeBitmap( AndDictionaryCtxt* ctxt, XP_U8 const** ptrp,
const XP_U8 const* end, XP_Bitmap* result )
const XP_U8* end, XP_Bitmap* result )
{
XP_Bool success = XP_TRUE;
XP_U8 const* ptr = *ptrp;
jobject bitmap = NULL;
CHECK_PTR( ptr, 1, end );
XP_U8 nCols = *ptr++;
jobject bitmap = NULL;
if ( nCols > 0 ) {
CHECK_PTR( ptr, 1, end );
XP_U8 nRows = *ptr++;
@ -157,7 +157,7 @@ andMakeBitmap( AndDictionaryCtxt* ctxt, XP_U8 const** ptrp,
static XP_Bool
andLoadSpecialData( AndDictionaryCtxt* ctxt, XP_U8 const** ptrp,
const XP_U8 const* end )
const XP_U8* end )
{
XP_Bool success = XP_TRUE;
XP_U16 nSpecials = andCountSpecials( ctxt );
@ -305,7 +305,7 @@ parseDict( AndDictionaryCtxt* ctxt, XP_U8 const* ptr, XP_U32 dictLength,
{
XP_Bool success = XP_TRUE;
XP_ASSERT( !!ptr );
const XP_U8 const* end = ptr + dictLength;
const XP_U8* end = ptr + dictLength;
XP_U32 offset;
XP_U16 nFaces, numFaceBytes = 0;
XP_U16 flags;

View file

@ -502,7 +502,7 @@ and_util_warnIllegalWord( XW_UtilCtxt* uc, BadWordInfo* bwi,
#ifdef XWFEATURE_CHAT
static void
and_util_showChat( XW_UtilCtxt* uc, const XP_UCHAR const* msg, XP_S16 from )
and_util_showChat( XW_UtilCtxt* uc, const XP_UCHAR* msg, XP_S16 from )
{
UTIL_CBK_HEADER( "showChat", "(Ljava/lang/String;ILjava/lang/String;)V" );
jstring jname = NULL;

View file

@ -568,7 +568,7 @@ public class BoardDelegate extends DelegateBase
Bundle args = getArguments();
m_rowid = args.getLong( GameUtils.INTENT_KEY_ROWID, -1 );
DbgUtils.logf( "BoardActivity: opening rowid %d", m_rowid );
DbgUtils.logf( "BoardDelegate.init(): opening rowid %d", m_rowid );
m_haveInvited = args.getBoolean( GameUtils.INVITED, false );
m_overNotShown = true;

View file

@ -9,6 +9,8 @@ XWORDS_DEBUG_X86ONLY=${XWORDS_DEBUG_X86ONLYx:-""}
echo "# Generated by $0; do not edit!!!" > $TMP_MK
echo "NDK_TOOLCHAIN_VERSION := clang" >> $TMP_MK
if [ -n "$XWORDS_DEBUG_ARMONLY" ]; then
echo "APP_ABI := armeabi" >> $TMP_MK
elif [ -n "$XWORDS_DEBUG_X86ONLY" ]; then

View file

@ -835,7 +835,7 @@ board_canHint( const BoardCtxt* board )
}
void
board_sendChat( const BoardCtxt* board, const XP_UCHAR const* msg )
board_sendChat( const BoardCtxt* board, const XP_UCHAR* msg )
{
server_sendChat( board->server, msg, board->selPlayer );
}

View file

@ -133,7 +133,7 @@ XP_Bool board_canHideRack( const BoardCtxt* board );
XP_Bool board_canTrade( BoardCtxt* board );
XP_Bool board_canTogglePending( const BoardCtxt* board );
XP_Bool board_canHint( const BoardCtxt* board );
void board_sendChat( const BoardCtxt* board, const XP_UCHAR const* msg );
void board_sendChat( const BoardCtxt* board, const XP_UCHAR* msg );
/* zoomBy: >0: zoom in; < 0: zoom out; 0: query only */
XP_Bool board_zoom( BoardCtxt* board, XP_S16 zoomBy, XP_Bool* canInOut );

View file

@ -514,9 +514,8 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model,
engine->searchHorizontal = XP_FALSE;
}
} /* forever */
outer:
result = result; /* c++ wants a statement after the label */
}
outer:
/* Search is finished. Choose (or just return) the best move found. */
if ( engine->returnNOW ) {
result = XP_FALSE;

View file

@ -636,7 +636,7 @@ server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream )
#ifdef XWFEATURE_CHAT
static void
sendChatTo( ServerCtxt* server, XP_U16 devIndex, const XP_UCHAR const* msg,
sendChatTo( ServerCtxt* server, XP_U16 devIndex, const XP_UCHAR* msg,
XP_S8 from )
{
if ( comms_canChat( server->vol.comms ) ) {
@ -652,7 +652,7 @@ sendChatTo( ServerCtxt* server, XP_U16 devIndex, const XP_UCHAR const* msg,
static void
sendChatToClientsExcept( ServerCtxt* server, XP_U16 skip,
const XP_UCHAR const* msg, XP_S8 from )
const XP_UCHAR* msg, XP_S8 from )
{
XP_U16 devIndex;
for ( devIndex = 1; devIndex < server->nv.nDevices; ++devIndex ) {
@ -663,7 +663,7 @@ sendChatToClientsExcept( ServerCtxt* server, XP_U16 skip,
}
void
server_sendChat( ServerCtxt* server, const XP_UCHAR const* msg, XP_S16 from )
server_sendChat( ServerCtxt* server, const XP_UCHAR* msg, XP_S16 from )
{
if ( server->vol.gi->serverRole == SERVER_ISCLIENT ) {
sendChatTo( server, SERVER_DEVICE, msg, from );

View file

@ -122,7 +122,7 @@ XP_Bool server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream );
#endif
#ifdef XWFEATURE_CHAT
void server_sendChat( ServerCtxt* server, const XP_UCHAR const* msg,
void server_sendChat( ServerCtxt* server, const XP_UCHAR* msg,
XP_S16 from );
#endif