[Pkg-wmaker-commits] [wmbubble] 178/207: Fix -Wpedantic compiler warnings.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 04:18:30 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmbubble.
commit ef74a92c433301729b5273cbae8b808a2f1bb092
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Sat Nov 29 09:59:24 2014 -0600
Fix -Wpedantic compiler warnings.
In particular:
In file included from bubblemon.c:66:0:
include/bubblemon.h:84:54: warning: extra semicolon in struct or union specified [-Wpedantic]
unsigned char bubblebuf[BOX_SIZE * (BOX_SIZE+4)];;
and
bubblemon.c: In function ‘main’:
bubblemon.c:552:3: warning: ISO C90 forbids mixed declarations and code [-Wpedantic]
int xx,yy;
^
---
bubblemon.c | 31 +++++++++++++++++++------------
include/bubblemon.h | 2 +-
2 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/bubblemon.c b/bubblemon.c
index 80682a7..f2fa542 100644
--- a/bubblemon.c
+++ b/bubblemon.c
@@ -549,19 +549,26 @@ int main(int argc, char **argv) {
#endif /*FPS*/
/* drawing borders: 1.136us/frame */
- int xx,yy;
- unsigned char * from;
-
- for (from=bm.rgb_buf,xx=0;xx<BOX_SIZE*3-3;from++,xx++) {
- from[0]/=4;
- from[BOX_SIZE*(BOX_SIZE-1)*3+3]=(255+from[BOX_SIZE*(BOX_SIZE-1)*3+3])/2;
- }
+ {
+ int xx,yy;
+ unsigned char * from;
+
+ for (from=bm.rgb_buf,xx=0;xx<BOX_SIZE*3-3;from++,xx++) {
+ from[0]/=4;
+ from[BOX_SIZE*(BOX_SIZE-1)*3+3]=
+ (255+from[BOX_SIZE*(BOX_SIZE-1)*3+3])/2;
+ }
- for (from=bm.rgb_buf,yy=0;yy<BOX_SIZE-1;yy++,from+=BOX_SIZE*3) {
- from[0]/=4; from[1]/=4; from[2]/=4;
- from[(2*BOX_SIZE-1)*3 ]=(255+from[(2*BOX_SIZE-1)*3 ])/2;
- from[(2*BOX_SIZE-1)*3+1]=(255+from[(2*BOX_SIZE-1)*3+1])/2;
- from[(2*BOX_SIZE-1)*3+2]=(255+from[(2*BOX_SIZE-1)*3+2])/2;
+ for (from=bm.rgb_buf,yy=0;yy<BOX_SIZE-1;yy++,
+ from+=BOX_SIZE*3) {
+ from[0]/=4; from[1]/=4; from[2]/=4;
+ from[(2*BOX_SIZE-1)*3 ]=
+ (255+from[(2*BOX_SIZE-1)*3 ])/2;
+ from[(2*BOX_SIZE-1)*3+1]=
+ (255+from[(2*BOX_SIZE-1)*3+1])/2;
+ from[(2*BOX_SIZE-1)*3+2]=
+ (255+from[(2*BOX_SIZE-1)*3+2])/2;
+ }
}
/* Our colorspace conversion: 18.17us/frame */
diff --git a/include/bubblemon.h b/include/bubblemon.h
index e6f5143..1ba4b71 100644
--- a/include/bubblemon.h
+++ b/include/bubblemon.h
@@ -81,7 +81,7 @@ typedef struct {
/* bubble stuff */
int samples;
- unsigned char bubblebuf[BOX_SIZE * (BOX_SIZE+4)];;
+ unsigned char bubblebuf[BOX_SIZE * (BOX_SIZE+4)];
int waterlevels[BOX_SIZE];
int waterlevels_dy[BOX_SIZE];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbubble.git
More information about the Pkg-wmaker-commits
mailing list