X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fintermomentary.c;h=753aba5a7edc1a4f54959a72f47ceff6bd2ea8ca;hb=3f438031d610c7e15fd33876a879b97e290e05fb;hp=b5a87de2b9be10a9d6c9a72f608c2b9ab974e2b4;hpb=bc7b7a8eb122206d239ec0e693676bcce31be1aa;p=xscreensaver diff --git a/hacks/intermomentary.c b/hacks/intermomentary.c index b5a87de2..753aba5a 100644 --- a/hacks/intermomentary.c +++ b/hacks/intermomentary.c @@ -30,6 +30,7 @@ * implied warranty. */ +#include #include "screenhack.h" #include #include @@ -211,8 +212,8 @@ inline unsigned long trans_point(int x1, int y1, unsigned long myc, float a, str if (a >= 1.0) { ref_pixel(f, x1, y1) = myc; } else { - unsigned short int or, og, ob; - unsigned short int r, g, b; + unsigned short int or = 0, og = 0, ob = 0; + unsigned short int r = 0, g = 0, b = 0; unsigned short int nr, ng, nb; unsigned long c; @@ -282,7 +283,7 @@ inline void moverender_rider(Display *dpy, Window window, GC fgc, struct field * double cs, cv; /* add velocity to theta */ - rid->t = fmodf((rid->t + rid->vt + M_PI), (2 * M_PI)) - M_PI; + rid->t = fmod((rid->t + rid->vt + M_PI), (2 * M_PI)) - M_PI; rid->vt += frand(0.002) - 0.001;