fix uninitialized warning. i variable is always initialized since i==100 and since i==100, ot is initialized. Reference: /n/atom/patch/applied/rtcredux Date: Sat Mar 1 16:42:28 CET 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/9/pc/devrtc.c Sat Mar 1 16:41:39 2014 +++ /sys/src/9/pc/devrtc.c Sat Mar 1 16:41:40 2014 @@ -159,6 +159,7 @@ ilock(&nvrtlock); /* loop till we get two reads in a row the same */ + ot = 0; t = _rtctime(); for(i = 0; i < 100; i++){ ot = t; --- /sys/src/9/pcpae/devrtc.c Sat Mar 1 16:41:41 2014 +++ /sys/src/9/pcpae/devrtc.c Sat Mar 1 16:41:42 2014 @@ -159,6 +159,7 @@ ilock(&nvrtlock); /* loop till we get two reads in a row the same */ + ot = 0; t = _rtctime(); for(i = 0; i < 100; i++){ ot = t; --- /sys/src/nix/k10/devrtc.c Sat Mar 1 16:41:44 2014 +++ /sys/src/nix/k10/devrtc.c Sat Mar 1 16:41:44 2014 @@ -159,6 +159,7 @@ ilock(&nvrtlock); /* loop till we get two reads in a row the same */ + ot = 0; t = rtcextract(); for(i = 0; i < 100; i++){ ot = rtcextract(); @@ -220,7 +221,7 @@ #define PUTBCD(n,o) bcdclock[o] = (n % 10) | (((n / 10) % 10)<<4) static long -rtcwrite(Chan* c, void* buf, long n, vlong off) +rtcwrite(Chan* c, void* buf, long n, vlong offset) { int t; char *a, *start; @@ -228,13 +229,11 @@ ulong secs; uchar bcdclock[Nbcd]; char *cp, *ep; - ulong offset = off; if(offset!=0) error(Ebadarg); - - switch((ulong)c->qid.path){ + switch((uint)c->qid.path){ case Qrtc: /* * read the time