From 3a3d8826b44f42458aa5e00ec8033a24c7801f5f Mon Sep 17 00:00:00 2001 From: Dave Cheney Date: Wed, 13 Jun 2012 16:23:32 -0400 Subject: [PATCH] [release-branch.go1] lib9: fix warning under clang 3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ««« backport 73a10f76098b lib9: fix warning under clang 3.1 Fixes #3534. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6035054 »»» --- src/lib9/ctime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib9/ctime.c b/src/lib9/ctime.c index 1bc29fbf9c..6317b594bb 100644 --- a/src/lib9/ctime.c +++ b/src/lib9/ctime.c @@ -16,8 +16,8 @@ p9ctime(long t) tt = t; tm = localtime(&tt); snprint(buf, sizeof buf, "%3.3s %3.3s %02d %02d:%02d:%02d %3.3s %d\n", - "SunMonTueWedThuFriSat"+(tm->tm_wday*3), - "JanFebMarAprMayJunJulAugSepOctNovDec"+(tm->tm_mon*3), + &"SunMonTueWedThuFriSat"[tm->tm_wday*3], + &"JanFebMarAprMayJunJulAugSepOctNovDec"[tm->tm_mon*3], tm->tm_mday, tm->tm_hour, tm->tm_min,