Re: CVS commit: src/external/bsd/file/dist/src

2014-01-17 Thread Alan Barrett

On Thu, 16 Jan 2014, Joerg Sonnenberger wrote:

Module Name:src
Committed By:   joerg
Date:   Thu Jan 16 23:36:52 UTC 2014

Modified Files:
src/external/bsd/file/dist/src: file.c

Log Message:
Only use __dead if it exists.


I think the code would be easier to read with

#ifndef __dead
#define __dead /* nothing */
#endif

--apb (Alan Barrett)


Re: CVS commit: src/external/bsd/file

2014-01-17 Thread David Laight
On Fri, Jan 17, 2014 at 08:24:20PM +, Martin Husemann wrote:
 Module Name:  src
 Committed By: martin
 Date: Fri Jan 17 20:24:20 UTC 2014
 
 Modified Files:
   src/external/bsd/file: Makefile.inc
 
 Log Message:
 Make a gcc 4.8 warning non-fatal (couldn't find a way to avoid it, the
 data is initialized via memcpy to a void pointer, so the may be 
 uninitialized
 warning is not true)

If the problem actually caused by gcc failing to pair all the conditionals?
Compiling with 'clazz' a compile-time constant might show things.

Or, if memcpy() is defined in a header file and uses casts to optimise
inlined copies of fixed sizes it might be that the pointer-aliasing
rules mean that the actual structure might not have been written.

A possible solution to that is an asm statement with a memory
constraint for the buffer areas either side of the actual copy.

David

-- 
David Laight: da...@l8s.co.uk