warning: initialization discards qualifiers from pointer target type

Andre Kirchner supercroc1974@yahoo.com
Mon Mar 3 20:40:00 GMT 2008


Hi All,

When I compile the following piece of code, I get 3 "warning: initialization discards qualifiers from pointer target type" messages which refer to  the 3 lines marked in the code. What's wrong with these lines? I searched the web for it, but didn't find anything useful.

Thanks,

Andre


enum CompressionType {
    DEFLATE = 0,
    GZIP
};

struct CompressionInfo {
    char   * Name;
    int32_t Type;
    uint32_t WindowSize;
};

static struct CompressionInfo compression_table[] = {
    { "deflate", DEFLATE, DEFLATE_WINDOW_SIZE },      <-- HERE
    { "gzip",    GZIP,    24 },                                                  <-- HERE
    { "",        -1,      0  }                                                          <-- HERE
};








      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs



More information about the Gcc-help mailing list