c++ - Why does it compile in Android source? -


i'm trying compile adb (core/adb) on windows using vs2008 manually. in function

static __inline__  char*  adb_dirstart( const char*  path ) {     char*  p  = strchr(path, '/');     ... 

i error:

sysdeps.h(247) : error c2440: 'initializing' : cannot      convert 'const char *' 'char *' 

the return type of strchr displayed vs2008 , described here is

const char * strchr ( const char * str, int character );       char * strchr (       char * str, int character ); 

as argument path const char*, first variant returning constant should used.

so why compile in android sdk? there compiler switch used in build scripts?


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -