From patchwork Fri Nov 15 20:47:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 179523 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp12994278ilf; Fri, 15 Nov 2019 12:47:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwNZYNYYnpYQUOHWDba/xWF+0mGwpmjNba7MFpV+qzcfco4LfSuARLcnHAJwBhi5cwz/3f9 X-Received: by 2002:aa7:8e52:: with SMTP id d18mr19492511pfr.95.1573850866303; Fri, 15 Nov 2019 12:47:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573850866; cv=none; d=google.com; s=arc-20160816; b=YGLZeIayJPOWQ4TA/0fwiBci1A4aD8FGLvpZi9g/FfexM3BTKHt0O1kWCL1ZlzAKbp XkWCpUcwSn+Sbtaefd/WK2TMtA37ZKO++2JZiMVtSUtPpx3EwT3AeHEj034b3G/7ju91 oXeB34Mcl4FNYESC6QPN3SLSfrSUTrsI23HXMdBlgqcBgR0c/u05QYlAoxRdlnw9oohK NsoskeAvy63oLVE/UgYDAXFISplqozXOESXX4Stke4XB2izwvma2/iuCA23jKxHHkC6S 1e4CN1ukTzb6SmxH/0dmH8MaIuBwXIDbQLORPzojoY/U+N7qGAfUW1GgwYWPinCoYlpX z4wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=TzFxzQkpXL2sk475VfLmbJq5VwzICL3kWEfmhgJWhbM=; b=KqPT/AQ+5SRmlDJpoCz4NYmkaGjV58UxY3koG7Ue+E0seUlzcpVwWSNzn/p8usoniE JTN/tLoISmWMtqRvDPd0WeRNzlapjRvmlJ+0ZartoBq0vuLuif921LXWoA04KUIDYuAB QY4LWQ6lJ/qf2YTg/plSYEYLj8NFDCyQo1evrHukdsOHFSsHj7TQ5C3bDqDk6kLYLdJh q4bZbh07qw6R0CxI9YOt+STUY93T4KNLhzmsD4RwGncGZBgrDUBfljfvstYT1IO/pIhh 3QmKnuiK+fhHHWi/2GBa7dWcAY1F8gTWyBzqBeg+qMxYojiShb7L4aeGHzySGKfk+iG2 Kr9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=AE+meRMd; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id hg9si10227368pjb.69.2019.11.15.12.47.45; Fri, 15 Nov 2019 12:47:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=AE+meRMd; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 34D357C446; Fri, 15 Nov 2019 20:47:38 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by mail.openembedded.org (Postfix) with ESMTP id B3B6C7C446 for ; Fri, 15 Nov 2019 20:47:34 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id j12so5451102plt.9 for ; Fri, 15 Nov 2019 12:47:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Cj23QssI4EFyrwZP+lOSgqo7Y6OCtMcE5mj6QHUiF6g=; b=AE+meRMdjP+tejlohHYLzcV6SohW3fDOjpUhhYsTU7m5x8d55beFXZo2EAM0Ekyab9 ETHUl6zjIoiEZBZvhA4zwFJE/xzQK1Nude6ovzSTxUhRXPVs5trOhYEzynT9iwt1Uted 3sR2xcApMGjFuCyYix9kC2xphRp4GCBiNlEhAx0ddiGrAlmQynPfEsVZylKHNKE/0lDR wc3nhePzZAMPajefpUMuzQMA4FAWdUbMybe62w0NZklHoutMkNlXUKbFNW0DaF/yaVFA e15O2R/zoFwrnh/iIBhju8/iyxXTKQuIbSJw1cn/9xkuBfNc16nr/9/C1sxPX4N3uYq0 SI6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Cj23QssI4EFyrwZP+lOSgqo7Y6OCtMcE5mj6QHUiF6g=; b=AxPbILj6u+dulteChPxCmygU3aDjxi4rj0aokHu5Zegxj0yplXwfhF0DDWiTEafSxC Oj/nbG8Rzk/6FQjuQZRdcZaH4a7sgJlzzPwGC/oLMkfo/Cq9ptww+7H1Inh29kIb0cwA EXd4EUoKcMBx8ceAChotat/bG+o9xhGWDdQoE7wZgl7ZGojbneUx/bBS8P44HzCAc+yr VH1WRBi6v2OqdK3Omo1cB2UIz4CtWSsIqsJYD2JfLoVbnJves4VtGnBEwMkDU77U9Ngh H22Gz00NtxZfbJ2Oixydzh37SM/Mr/rbE2RBJsPepjSRK9cdPgBZ9QYswhUghnIt9Sdh RIGQ== X-Gm-Message-State: APjAAAXKBCrlj0SZIiybulARaz+MvNPL0IDSKxV72iOyOwGIz8XWGv4P xCeRwHH1N7i+cpQN0tUb4POOhLHadoo= X-Received: by 2002:a17:902:6b01:: with SMTP id o1mr1857508plk.24.1573850855139; Fri, 15 Nov 2019 12:47:35 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:1c20::30e8]) by smtp.gmail.com with ESMTPSA id s15sm6524246pjp.3.2019.11.15.12.47.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 12:47:34 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Fri, 15 Nov 2019 12:47:20 -0800 Message-Id: <20191115204720.1294151-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [oe] [meta-gnome][PATCH] evince: Fix build with clang X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Enhance the patch for printf format checking to make clang work as well Signed-off-by: Khem Raj Cc: Andreas Müller --- ...002-add-a-formatting-attribute-check.patch | 96 ++++++++++++++++++- 1 file changed, 92 insertions(+), 4 deletions(-) diff --git a/meta-gnome/recipes-gnome/evince/evince/0002-add-a-formatting-attribute-check.patch b/meta-gnome/recipes-gnome/evince/evince/0002-add-a-formatting-attribute-check.patch index e87da90bce..c374fc9430 100644 --- a/meta-gnome/recipes-gnome/evince/evince/0002-add-a-formatting-attribute-check.patch +++ b/meta-gnome/recipes-gnome/evince/evince/0002-add-a-formatting-attribute-check.patch @@ -19,16 +19,104 @@ Signed-off-by: Khem Raj cut-n-paste/unarr/common/unarr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/cut-n-paste/unarr/common/unarr.c b/cut-n-paste/unarr/common/unarr.c -index 97ec92a..9e6e3ad 100644 --- a/cut-n-paste/unarr/common/unarr.c +++ b/cut-n-paste/unarr/common/unarr.c -@@ -92,7 +92,7 @@ size_t ar_get_global_comment(ar_archive *ar, void *buffer, size_t count) +@@ -92,7 +92,7 @@ size_t ar_get_global_comment(ar_archive return ar->get_comment(ar, buffer, count); } -void ar_log(const char *prefix, const char *file, int line, const char *msg, ...) -+void __attribute__((__format__ (__printf__, 4, 0))) ar_log(const char *prefix, const char *file, int line, const char *msg, ...) ++void __attribute__((__format__ (__printf__, 4, 5))) ar_log(const char *prefix, const char *file, int line, const char *msg, ...) { va_list args; va_start(args, msg); +--- a/cut-n-paste/synctex/synctex_parser_utils.c ++++ b/cut-n-paste/synctex/synctex_parser_utils.c +@@ -87,11 +87,11 @@ void _synctex_free(void * ptr) { + # include + #endif + +-int _synctex_error(const char * reason, ...) __attribute__((__format__ (__printf__, 1, 2))); +-int _synctex_log(int level, const char * prompt, const char * reason, va_list arg) __attribute__((__format__ (__printf__, 3, 0))); +- +-int _synctex_log(int level, const char * prompt, const char * reason,va_list arg) { ++static int _synctex_log(int level, const char * prompt, const char * reason, ...) SYNCTEX_PRINTF_FORMAT(3, 0); ++static int _synctex_log(int level, const char * prompt, const char * reason, ...) { ++ va_list arg; + int result; ++ va_start(arg, reason); + # ifdef SYNCTEX_RECENT_WINDOWS + {/* This code is contributed by William Blum. + As it does not work on some older computers, +@@ -133,10 +133,10 @@ int _synctex_log(int level, const char * + result += vfprintf(where, reason, arg); + result += fprintf(where,"\n"); + # endif ++ va_end(arg); + return result; + } + +-__attribute__((__format__ (__printf__, 1, 0))) + int _synctex_error(const char * reason,...) { + va_list arg; + int result; +@@ -355,6 +355,7 @@ char * _synctex_merge_strings(const char + size_t len = strlen(temp); + if(UINT_MAX-len