Skip to content

Compile-time warning #8

@dmacks

Description

@dmacks

Compiling libGDSII-0.21 on OS X 10.13 with Apple's compiler toolchain...

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT ReadGDSIIFile.lo -MD -MP -MF .deps/ReadGDSIIFile.Tpo -c ReadGDSIIFile.cc  -fno-common -DPIC -o .libs/ReadGDSIIFile.o
ReadGDSIIFile.cc:654:50: warning: adding 'libGDSII::BYTE' (aka 'unsigned char')
      to a string does not append to the string [-Wstring-plus-int]
       *ErrMsg = new string("unknown data type " + DType);
                            ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
ReadGDSIIFile.cc:654:50: note: use array indexing to silence this warning
       *ErrMsg = new string("unknown data type " + DType);
                                                 ^
                            &                    [      ]
1 warning generated.

Should it be some sort of ostringstream (like around line 579) or other type of concatenation or sprintf?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions