Motion - Reduce Warnings Patch

A patch for lesser warnings when compiled with --with-developer-flags

Description of Patch

This patch is a follow up to the new --with-developer-flags option for configure.

The patch does not change functionality or fix any bugs but it eliminates many of the warnings and could long term help expose latent defects.

Installation of Patch

Download the patch file. If it is packed as a gz or tar.gz unpack it first. Then copy it to the motion source directory and issue the command (assuming the patch file is called warnings2.diff.gz)

gunzip -cd warnings2.diff | patch

Then re-build Motion and test the patch.

Change History of Patch

  • warnings - Initial revision
  • warnings2 - No SEGV Version

Discussion and Comments


Great work Peter.

Note. BillBrack is currently enhancing this patch as agreed on IRC so more versions are expected. I will wait integrating the patch until then.

-- KennethLavrsen - 14 Aug 2005

I changed a few things, particularly relating to the treatment of "char *" versus "const char *". I also put in a macro to avoid the "unused parameter" warning. The attached file (warnings3.diff.gz) should be applied against an unpatched copy of motion-3.2.2. (Not yet finished, but getting closer smile

-- BillBrack - 15 Aug 2005

I have not checked this latest patch yet but for your info - I changed the code quite a few places to fix some severe bugs.

So you may want to check and fix the patch relative to the daily snap 20050816.

-- KennethLavrsen - 16 Aug 2005

look at used myfopen: myfopen(cnt, file, (char *)"w");

you dont need (char *)"w" anymore because of

FILE * myfopen(struct context *cnt, const char *path, const char *mode)

-- PeterHolik - 16 Aug 2005

Integrated into motion-20050818

With some modifications.

I finished the job and the 20050819 is now without warnings from the Motion sources.

I also did removed the (char *)"w".

Additional warning removal code and suggestions were done by Angel Carpintero.

Last batch of warnings were fixed by Kenneth Lavrsen.

-- KennethLavrsen - 18 Aug 2005
Topic attachments
I Attachment Action Size Date Who Comment
warnings.diffdiff warnings.diff manage 38 K 14 Aug 2005 - 17:34 KennethLavrsen Known bug in this patch!
warnings2.diff.gzgz warnings2.diff.gz manage 8 K 14 Aug 2005 - 17:55 PeterHolik no SEGV should work now
warnings3.diff.gzgz warnings3.diff.gz manage 12 K 15 Aug 2005 - 08:15 BillBrack First enhanced version
Topic revision: r9 - 20 Dec 2005, KennethLavrsen
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.