* commit '771f6f299f16704b251d6adb8fb185c8fb517d07': Fix build of adb with gcc-4.9.
This commit is contained in:
commit
e772705a59
1 changed files with 5 additions and 2 deletions
|
@ -1746,9 +1746,10 @@ top:
|
|||
return 1;
|
||||
}
|
||||
|
||||
#define MAX_ARGV_LENGTH 16
|
||||
static int do_cmd(transport_type ttype, char* serial, char *cmd, ...)
|
||||
{
|
||||
char *argv[16];
|
||||
char *argv[MAX_ARGV_LENGTH];
|
||||
int argc;
|
||||
va_list ap;
|
||||
|
||||
|
@ -1765,7 +1766,9 @@ static int do_cmd(transport_type ttype, char* serial, char *cmd, ...)
|
|||
}
|
||||
|
||||
argv[argc++] = cmd;
|
||||
while((argv[argc] = va_arg(ap, char*)) != 0) argc++;
|
||||
while(argc < MAX_ARGV_LENGTH &&
|
||||
(argv[argc] = va_arg(ap, char*)) != 0) argc++;
|
||||
assert(argc < MAX_ARGV_LENGTH);
|
||||
va_end(ap);
|
||||
|
||||
#if 0
|
||||
|
|
Loading…
Reference in a new issue