Skip to content

kstring.h error: initializer-string for array of chars is too long #771

@cwrussell

Description

@cwrussell

When trying to install another program (pindel), there is an error related to kstring.h

make -C src pindel
make[1]: Entering directory '/mnt/projects/cwrussell/MAE/svre/pindel/Pindel/src'
g++  -I/mnt/projects/cwrussell/MAE/svre/pindel/htslib -Wall -g -c -O3 -fopenmp pindel.cpp -o pindel.o
In file included from /mnt/projects/cwrussell/MAE/svre/pindel/htslib/htslib/khash.h:131:0,
    from pindel.h:34,
    from pindel.cpp:35:
/mnt/projects/cwrussell/MAE/svre/pindel/htslib/htslib/kstring.h: In function ‘int kputuw(unsigned int, kstring_t*)’:
/mnt/projects/cwrussell/MAE/svre/pindel/htslib/htslib/kstring.h:221:9: error: initializer-string for array of chars is too long [-fpermissive]
         "90919293949596979899";
         ^

Changing line 211 in kstring.h from static const char kputuw_dig2r[200] = to static const char kputuw_dig2r[201] = allows the pindel installation to occur without error, although I'm unsure of any other consequences related to this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions