On Wed, 24 Sep 2014 00:07:16 +0200, Ulrich Wilkens wrote:
> Resolve many build warnings 
> 
> This patch fixes many warnings from the beginning of the build up to
> and including the depend stage. Nearly all warnings should be gone
> even with -Wall. 
> 
> The main problem was the depend stage for dtappbuilder, ttsnoop and dtksh.
> It checks for files which are created later during the making stage. Since
> the files don't exist at check time makedepend issues a lot of warnings,
> "gcc -E" even some fatal errors.
> The solution was to move the creation of the files to the include stage. 
> 
> In addition the following changes have been made:
>  - avoid duplicate Makefile targets
>  - fix recursion in makedepend
>  - avoid dtcodegen warnings
>  - correct wrong and missing data types and return values
>  - replacement of sprintf, strcpy, strcat with snprintf, strncpy and strncat
>  - create missing makefiles for Linux and BSDs in dtappbuilder
>  - add missing round or curly brackets to array types
>  - other minor fixes

I believe I found two types of problems in this patch:

-               mkstemp(tmpMakefile);
+               int ret = mkstemp(tmpMakefile);
+               (void) ret;

Why not (void)mkstemp(...)?  But this should really actually *do*
something with the return value and handle the error condition.

-         strcpy(ptr, name->sysname);
+         strncpy(ptr, name->sysname, SYS_NMLN);

strncpy() does not guarantee NUL-termination if sizeof(dst) ==
sizeof(src).  I believe these should be replaced by strlcpy.  A portable
copy can be included for operating systems that don't have it in libc.

Also, the write_xxx_params() functions in dtappbuilder definitely need
more work.  I'm pretty sure X11 includes aren't in /X11/include on most
systems nowadays, and OpenBSD surely will not install CDE libraries into
/usr/dt/lib.

>>> text/x-patch content
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> cdesktopenv-devel mailing list
> cdesktopenv-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel
> 

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to