From patchwork Fri Feb 27 18:07:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Vesely X-Patchwork-Id: 5902331 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5B91E9F36A for ; Fri, 27 Feb 2015 18:07:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8467D2020E for ; Fri, 27 Feb 2015 18:07:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 728BF201F4 for ; Fri, 27 Feb 2015 18:07:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA7916E933; Fri, 27 Feb 2015 10:07:33 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f41.google.com (mail-qa0-f41.google.com [209.85.216.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 14B946E92F for ; Fri, 27 Feb 2015 10:07:32 -0800 (PST) Received: by mail-qa0-f41.google.com with SMTP id x12so13963101qac.0 for ; Fri, 27 Feb 2015 10:07:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=lG90AFBmpYxE7K4F1whz5Wz5oytENzJB6xh/Czhz+Fk=; b=IC0481l132kkBUWc27lh8YVhUkbCBDCAJuqBdacuzg2teFDhET36vKsnTYYOFnzZsR o9Kk9KqOewa2MB6w1ACDhOZXgkdYZTK+1a2r3EmSBrmkFdNUBoMg5c7IBALT/HxEvT5B FCEkQNrB0oGzxkTGSe5dE476Nj8qgOqFuC1ogOFQ/1glYxAPq/wCSno9KW0KxGiQpav6 340uvr+BSp5Q7KybfLQywwsyd6FChDQyP6AGX1FVpeBJdJLq5rjDQkLHYDpMLlzNi+fs i6HaUIst+Q2XJ3m//oUb1cK6RF0rqfdnD4/t+8w7r2ehLnyaz+769KFGWtqogu3PNSPU wkYA== X-Gm-Message-State: ALoCoQnYKdoramRLFfEZjveyniE4NkTmIcw4rKSQNKOki2YI2AvZZjlrloO8UxBrR+DgG575yH19 X-Received: by 10.140.31.116 with SMTP id e107mr4272515qge.36.1425060451619; Fri, 27 Feb 2015 10:07:31 -0800 (PST) Received: from adriatix.rutgers.edu ([198.151.130.147]) by mx.google.com with ESMTPSA id 70sm3062318qhe.29.2015.02.27.10.07.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 10:07:31 -0800 (PST) From: Jan Vesely To: Emil Velikov , dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 3/8] Fix type-limits, pointer-arith and sign-compare warnings Date: Fri, 27 Feb 2015 13:07:23 -0500 Message-Id: <1425060448-5315-4-git-send-email-jan.vesely@rutgers.edu> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1425060448-5315-1-git-send-email-jan.vesely@rutgers.edu> References: <1425060448-5315-1-git-send-email-jan.vesely@rutgers.edu> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Jan Vesely --- tests/dristat.c | 4 ++-- tests/getstats.c | 2 -- xf86drmMode.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/dristat.c b/tests/dristat.c index 449aa24..992ceb4 100644 --- a/tests/dristat.c +++ b/tests/dristat.c @@ -189,9 +189,9 @@ static void printhuman(unsigned long value, const char *name, int mult) static void getstats(int fd, int i) { drmStatsT prev, curr; - int j; + unsigned j; double rate; - + printf(" System statistics:\n"); if (drmGetStats(fd, &prev)) return; diff --git a/tests/getstats.c b/tests/getstats.c index 8d40d0b..8a7d299 100644 --- a/tests/getstats.c +++ b/tests/getstats.c @@ -45,8 +45,6 @@ int main(int argc, char **argv) ret = ioctl(fd, DRM_IOCTL_GET_STATS, &stats); assert(ret == 0); - assert(stats.count >= 0); - close(fd); return 0; } diff --git a/xf86drmMode.c b/xf86drmMode.c index 1c06a19..61d5e01 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -76,7 +76,7 @@ static inline int DRM_IOCTL(int fd, unsigned long cmd, void *arg) * Util functions */ -static void* drmAllocCpy(void *array, int count, int entry_size) +static void* drmAllocCpy(char *array, int count, int entry_size) { char *r; int i;