Received: from eggs.gnu.org ([2001:4830:134:3::10]:60529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzDVE-0003QB-OR for qemu-devel@nongnu.org; Tue, 25 Oct 2016 21:59:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzDVB-0003A8-Mv for qemu-devel@nongnu.org; Tue, 25 Oct 2016 21:59:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54160) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzDVB-00039H-I9 for qemu-devel@nongnu.org; Tue, 25 Oct 2016 21:59:37 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1BE0E8553E for ; Wed, 26 Oct 2016 01:59:36 +0000 (UTC) From: Fam Zheng Date: Wed, 26 Oct 2016 09:59:32 +0800 Message-Id: <1477447172-19677-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH] trace: Fix 'char **' compilation error in simple backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi Currently, the generated function body will do "strlen(arg)" but the argument could be 'char **'. Avoid that by exclusding such cases in is_string check. Reported by patchew's "make docker-test-mingw@fedora". Signed-off-by: Fam Zheng --- scripts/tracetool/backend/simple.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py index 9885e83..2538795 100644 --- a/scripts/tracetool/backend/simple.py +++ b/scripts/tracetool/backend/simple.py @@ -21,7 +21,9 @@ PUBLIC = True def is_string(arg): strtype = ('const char*', 'char*', 'const char *', 'char *') - if arg.lstrip().startswith(strtype): + non_strtype = ('const char**', 'char**', 'const char **', 'char **') + arg_strip = arg.lstrip() + if arg_strip.startswith(strtype) and not arg_strip.startswith(non_strtype): return True else: return False -- 2.7.4