From b69bd664561d7c2d7d6c937341b5e4790a24b0cc Mon Sep 17 00:00:00 2001 From: edwin Date: Sat, 5 Jun 2010 12:31:08 +0000 Subject: [PATCH] Make clang happier by removing unused assignments. --- usr.bin/calendar/sunpos.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/usr.bin/calendar/sunpos.c b/usr.bin/calendar/sunpos.c index a0546e51bcf9..72b8f5c0c055 100644 --- a/usr.bin/calendar/sunpos.c +++ b/usr.bin/calendar/sunpos.c @@ -226,26 +226,24 @@ fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsti * It happens when the returned value "dec" goes from * [350 ... 360> -> [0 ... 10] */ - found = 0; - prevdec = 350; for (d = 18; d < 31; d++) { -// printf("Comparing day %d to %d.\n", d, d+1); + /* printf("Comparing day %d to %d.\n", d, d+1); */ sunpos(year, 3, d, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decleft); sunpos(year, 3, d + 1, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decright); -// printf("Found %g and %g.\n", decleft, decright); + /* printf("Found %g and %g.\n", decleft, decright); */ if (SIGN(decleft) == SIGN(decright)) continue; dial = SECSPERDAY; s = SECSPERDAY / 2; while (s > 0) { -// printf("Obtaining %d (%02d:%02d)\n", -// dial, SHOUR(dial), SMIN(dial)); + /* printf("Obtaining %d (%02d:%02d)\n", + dial, SHOUR(dial), SMIN(dial)); */ sunpos(year, 3, d, UTCoffset, SHOUR(dial), SMIN(dial), SSEC(dial), 0.0, 0.0, &L, &decmiddle); -// printf("Found %g\n", decmiddle); + /* printf("Found %g\n", decmiddle); */ if (SIGN(decleft) == SIGN(decmiddle)) { decleft = decmiddle; dial += s; @@ -253,7 +251,9 @@ fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsti decright = decmiddle; dial -= s; } -// printf("New boundaries: %g - %g\n", decleft, decright); + /* + printf("New boundaries: %g - %g\n", decleft, decright); + */ s /= 2; } @@ -265,26 +265,24 @@ fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsti * It happens when the returned value "dec" goes from * [10 ... 0] -> <360 ... 350] */ - found = 0; - prevdec = 10; for (d = 18; d < 31; d++) { -// printf("Comparing day %d to %d.\n", d, d+1); + /* printf("Comparing day %d to %d.\n", d, d+1); */ sunpos(year, 9, d, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decleft); sunpos(year, 9, d + 1, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decright); -// printf("Found %g and %g.\n", decleft, decright); + /* printf("Found %g and %g.\n", decleft, decright); */ if (SIGN(decleft) == SIGN(decright)) continue; dial = SECSPERDAY; s = SECSPERDAY / 2; while (s > 0) { -// printf("Obtaining %d (%02d:%02d)\n", -// dial, SHOUR(dial), SMIN(dial)); + /* printf("Obtaining %d (%02d:%02d)\n", + dial, SHOUR(dial), SMIN(dial)); */ sunpos(year, 9, d, UTCoffset, SHOUR(dial), SMIN(dial), SSEC(dial), 0.0, 0.0, &L, &decmiddle); -// printf("Found %g\n", decmiddle); + /* printf("Found %g\n", decmiddle); */ if (SIGN(decleft) == SIGN(decmiddle)) { decleft = decmiddle; dial += s; @@ -292,7 +290,9 @@ fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsti decright = decmiddle; dial -= s; } -// printf("New boundaries: %g - %g\n", decleft, decright); + /* + printf("New boundaries: %g - %g\n", decleft, decright); + */ s /= 2; }