lkml.org 
[lkml]   [2008]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 5/6] Werror: Remove the packed attribute from PofTimStamp_tag in the hysdn driver
    On Thu, 29 May 2008 19:17:46 +0100 David Howells <dhowells@redhat.com> wrote:

    > Remove the packed attribute from PofTimStamp_tag in the hysdn driver as the
    > thing being packed is just an array of chars.

    When fixing warnings and build errors, please do quote the compiler
    output in the changelog. Ditto sparse, etc.

    > Signed-off-by: David Howells <dhowells@redhat.com>
    > ---
    >
    > drivers/isdn/hysdn/hysdn_pof.h | 2 +-
    > 1 files changed, 1 insertions(+), 1 deletions(-)
    >
    >
    > diff --git a/drivers/isdn/hysdn/hysdn_pof.h b/drivers/isdn/hysdn/hysdn_pof.h
    > index a368d6c..3a72b90 100644
    > --- a/drivers/isdn/hysdn/hysdn_pof.h
    > +++ b/drivers/isdn/hysdn/hysdn_pof.h
    > @@ -60,7 +60,7 @@ typedef struct PofRecHdr_tag { /* Pof record header */
    >
    > typedef struct PofTimeStamp_tag {
    > /*00 */ unsigned long UnixTime __attribute__((packed));
    > - /*04 */ unsigned char DateTimeText[0x28] __attribute__((packed));
    > + /*04 */ unsigned char DateTimeText[0x28];
    > /* =40 */
    > /*2C */
    > } tPofTimeStamp;

    I was admiring this the other day. The compiler (my one at least) says

    drivers/isdn/hysdn/hysdn_pof.h:63: warning: 'packed' attribute ignored for field of type 'unsigned char[39u]'

    39u != 0x28. What's up with that?


    \
     
     \ /
      Last update: 2008-05-29 21:27    [W:0.026 / U:120.948 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site