Commit graph

3293 commits

Author SHA1 Message Date
Bill Kendrick
41e9fbd0c4 More compiler warning cleanup
Mostly removing some unused variables, but also "using" some
of the new temp vars (e.g., "tmp = fgets(...); (void)tmp;")
2017-10-15 15:00:48 -07:00
Bill Kendrick
717b13a866 Correct im.c compiler warnings
* Don't ignore a fscanf()'s output.
 * Rewrite some increment/roll-overs to avoid, e.g.
   src/im.c:1193:18: warning: operation on ‘cm.section’ may be undefined [-Wsequence-point]
        cm.section = (++cm.section % SEC_TOTAL);  /* Change section */
2017-10-15 14:48:31 -07:00
Bill Kendrick
5907713cdd Remove unused reset_brush_counter_and_frame()
reset_brush_counter() gets called, but reset_brush_counter_and_frame()
never does; removing it.
2017-10-15 14:45:22 -07:00
Bill Kendrick
da81a5f32a Compiler warning cleanup in fonts.c
* Use and show error on nice() return value, when appropriate.
 * Remove (comment out, for now) a function that could never be called.
2017-10-15 14:43:20 -07:00
Bill Kendrick
b693003b14 Remove some unused funcs & declarations
Removing more unused functions, and moving a declaration in fonts.h
to fonts.c, since it's not used externally (reliable_read()).
2017-10-15 14:38:52 -07:00
Bill Kendrick
502edda2b1 Remove unused in_circle() func
in_circle() isn't used; in_circle_rad() is.
2017-10-15 14:33:11 -07:00
Bill Kendrick
dc167b4c52 Remove unused funcs remove_slash, replace_tilde
Remove unused funcs remove_slash() (an identical one exists
in win32_print.c) and replace_tilde().
2017-10-15 14:29:12 -07:00
Bill Kendrick
1ae588baf8 More compiler warning cleanup (WIP)
Picking at more compiler warnings.
2017-10-15 13:09:05 -07:00
Bill Kendrick
284a64a08f tuxpaint.c code & warning clean-up (WIP)
- Replace any C++ style comments (// ...) with C style (/* ... */).
 - Improve calls to fgets() to avoid "ignoring return value
   of ‘fscanf’, declared with attribute warn_unused_result
   [-Wunused-result]" errors (WIP).
 - Removed some unused, commented-out code.
2017-10-15 12:57:43 -07:00
Bill Kendrick
a8a0276f89 Noted indent-ification in CHANGES.txt 2017-10-15 12:18:36 -07:00
Bill Kendrick
f03785e532 indent tuxpaint.c -- the whopper!
The big one we've all been waiting for -- ran indent on tuxpaint.c
(which itself is ~25K lines long, and really needs to be split up).

Hopefully the code will look less atrocious now :-)
2017-10-15 12:16:05 -07:00
Bill Kendrick
5e0d51c771 Sanitized some grid_dims assignments
A number of assignments of grid_dims structs were of the form of
(ignoring some carriage returns, which undoubtedly added to the
confusion):

  gd_controls = (grid_dims) { 3, 2 };

which confused `indent`, causing it to think certain if/else blocks
were being ended early.

Turning these into assignments, like so, to avoid this:

  gd_controls.rows = 3;
  gd_controls.cols = 2;
2017-10-15 12:06:27 -07:00
Bill Kendrick
3e96684bde Pointer assignment syntax tweak
Correcting for a warning given by indent:

  Warning:old style assignment ambiguity in "=*".  Assuming "= *"
2017-10-15 11:55:50 -07:00
Bill Kendrick
1bb6bbeef4 indent magic tool example code (tp_magic_example.c)
Sure, why not?  Running `indent` on "tp_magic_example.c" in the
Magic Tool development docs :-)
2017-10-15 11:52:51 -07:00
Bill Kendrick
4ab8280bbe indent xor.c 2017-10-15 11:51:27 -07:00
Bill Kendrick
5a88d476c8 indent waves.c 2017-10-15 11:51:22 -07:00
Bill Kendrick
cc7dd8e3c9 indent tv.c 2017-10-15 11:51:18 -07:00
Bill Kendrick
011f7f27c1 indent tornado.c 2017-10-15 11:51:13 -07:00
Bill Kendrick
cf3173690d indent toothpaste.c 2017-10-15 11:51:10 -07:00
Bill Kendrick
5871ef9b3a indent tint.c 2017-10-15 11:51:06 -07:00
Bill Kendrick
d311aeb236 indent string.c 2017-10-15 11:51:02 -07:00
Bill Kendrick
29b25992ad indent snow.c 2017-10-15 11:50:59 -07:00
Bill Kendrick
6071c06c06 indent smudge.c 2017-10-15 11:50:37 -07:00
Bill Kendrick
e6a81956de indent shift.c 2017-10-15 11:50:00 -07:00
Bill Kendrick
fee4c7ca44 indent sharpen.c 2017-10-15 11:49:48 -07:00
Bill Kendrick
ac74e0ed51 indent rosette.c 2017-10-15 11:49:41 -07:00
Bill Kendrick
fea1b424ba indent ripples.c 2017-10-15 11:49:34 -07:00
Bill Kendrick
247be68e46 indent realrainbow.c 2017-10-15 11:49:17 -07:00
Bill Kendrick
408bb07151 indent rain.c 2017-10-15 11:49:06 -07:00
Bill Kendrick
b52cf2b0a5 indent rainbow.c 2017-10-15 11:49:01 -07:00
Bill Kendrick
b06b7e51b4 indent rails.c 2017-10-15 11:48:54 -07:00
Bill Kendrick
6a89ec2384 indent puzzle.c 2017-10-15 11:48:44 -07:00
Bill Kendrick
04580641df indent perspective.c 2017-10-15 11:48:38 -07:00
Bill Kendrick
88e9a3dfcf indent noise.c 2017-10-15 11:48:27 -07:00
Bill Kendrick
53a328e903 indent negative.c 2017-10-15 11:48:18 -07:00
Bill Kendrick
5e83b2408d indent mosaic_shaped.c 2017-10-15 11:48:08 -07:00
Bill Kendrick
bd18815216 indent mosaic.c 2017-10-15 11:48:02 -07:00
Bill Kendrick
18be491419 indent mirror_flip.c 2017-10-15 11:47:45 -07:00
Bill Kendrick
800d8af3b7 indent metalpaint.c 2017-10-15 11:47:37 -07:00
Bill Kendrick
7e524f44ad indent light.c 2017-10-15 11:47:27 -07:00
Bill Kendrick
e146c3df38 indent kalidescope.c 2017-10-15 11:47:20 -07:00
Bill Kendrick
3bfbc3e741 indent halftone.c 2017-10-15 11:47:04 -07:00
Bill Kendrick
fb1e2a092d indent grass.c 2017-10-15 11:46:50 -07:00
Bill Kendrick
9fd870b985 indent glasstile.c 2017-10-15 11:45:55 -07:00
Bill Kendrick
8a7edd82bf indent fretwork.c 2017-10-15 11:45:47 -07:00
Bill Kendrick
31cb4f4505 indent fold.c 2017-10-15 11:45:23 -07:00
Bill Kendrick
c855261af2 indent foam.c 2017-10-15 11:44:56 -07:00
Bill Kendrick
8eff6a9930 indent flower.c 2017-10-15 11:44:48 -07:00
Bill Kendrick
b11972979c indent fisheye.c 2017-10-15 11:44:41 -07:00
Bill Kendrick
0608ce4c34 indent fill.c 2017-10-15 11:44:35 -07:00