From owner-svn-ports-all@freebsd.org Tue Dec 20 01:52:01 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68E70C890D0; Tue, 20 Dec 2016 01:52:01 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FF4A1B2D; Tue, 20 Dec 2016 01:52:01 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBK1q03C098250; Tue, 20 Dec 2016 01:52:00 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBK1q0nw098248; Tue, 20 Dec 2016 01:52:00 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201612200152.uBK1q0nw098248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Tue, 20 Dec 2016 01:52:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r428970 - in head/games/openbor: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2016 01:52:01 -0000 Author: jbeich Date: Tue Dec 20 01:51:59 2016 New Revision: 428970 URL: https://svnweb.freebsd.org/changeset/ports/428970 Log: games/openbor: fix off-by-one noticed by gcc6 openbor.c: In function 'common_dot': openbor.c:20485:39: warning: iteration 10 invokes undefined behavior [-Waggressive-loop-optimizations] iDot_time = self->dot_time[iIndex]; //Get expire time. ~~~~~~~~~~~~~~^~~~~~~~ openbor.c:20483:5: note: within this loop for(iIndex = 0; iIndex <= MAX_DOTS; iIndex++) //Loop through all DOT indexes. ^~~ Modified: head/games/openbor/Makefile (contents, props changed) head/games/openbor/files/patch-openbor.c (contents, props changed) Modified: head/games/openbor/Makefile ============================================================================== --- head/games/openbor/Makefile Tue Dec 20 01:44:05 2016 (r428969) +++ head/games/openbor/Makefile Tue Dec 20 01:51:59 2016 (r428970) @@ -2,7 +2,7 @@ PORTNAME= openbor PORTVERSION= 3.0.r4415 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games devel MASTER_SITES= LOCAL/jbeich \ https://svn.code.sf.net/p/${PORTNAME}/engine/engine/:svn Modified: head/games/openbor/files/patch-openbor.c ============================================================================== --- head/games/openbor/files/patch-openbor.c Tue Dec 20 01:44:05 2016 (r428969) +++ head/games/openbor/files/patch-openbor.c Tue Dec 20 01:51:59 2016 (r428970) @@ -18,6 +18,15 @@ // Allocate memory and get pointer. result = malloc(alloc_size); +@@ -20480,7 +20480,7 @@ void common_dot() + entity *eOpp; //Owner of dot effect. + s_collision_attack attack; //Attack struct. + +- for(iIndex = 0; iIndex <= MAX_DOTS; iIndex++) //Loop through all DOT indexes. ++ for(iIndex = 0; iIndex < MAX_DOTS; iIndex++) //Loop through all DOT indexes. + { + iDot_time = self->dot_time[iIndex]; //Get expire time. + iDot_cnt = self->dot_cnt[iIndex]; //Get next tick time. @@ -34617,7 +34617,7 @@ void keyboard_setup(int player) strncpy(buttonnames[SDID_SPECIAL], "Special", 16); strncpy(buttonnames[SDID_START], "Start", 16);