Giter Site home page Giter Site logo

Comments (5)

mktrost avatar mktrost commented on August 13, 2024

I am interested in fixing some of the warnings that you are seeing. Could you please share those (as well as your version of gcc). Thank you.
I will update the documentation with information on how to disable the treatment of warnings as errors, but I would also like to fix it so it doesn't generate warnings.

from bamutil.

nahmadsen avatar nahmadsen commented on August 13, 2024

I case you still are interested in fixing warnings.
This is on libStatGen-1.0.14

$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

I am seeing this issue.

Parameters.cpp -DVERSION="\"1.0.0\""
Parameters.cpp: In member function \u2018virtual void LongParameters::Status()\u2019:
Parameters.cpp:573:25: error: use of an operand of type \u2018bool\u2019 in \u2018operator++\u2019 is deprecated [-Werror=deprecated]
             legacy_count++;
                         ^~
cc1plus: all warnings being treated as errors
../Makefiles/Makefile.common:81: recipe for target 'obj/Parameters.o' failed


from bamutil.

nahmadsen avatar nahmadsen commented on August 13, 2024

Also a warning from StringBasics.cpp

StringBasics.cpp: In static member function \u2018static void String::check_vsnprintf()\u2019:
StringBasics.cpp:1391:6: warning: \u2018%5s\u2019 directive output truncated writing 9 bytes into a region of size 5 [-Wformat-truncation=]
 void String::check_vsnprintf()
      ^~~~~~
StringBasics.cpp:1398:57: note: \u2018snprintf\u2019 output 10 bytes into a destination of size 5
         int check = snprintf(temp, 5, "%5s", "VSNPRINTF");
                                                         ^

from bamutil.

Tsallagov avatar Tsallagov commented on August 13, 2024

@nahmadsen, working on other job and even other field, but thank you for answer.

from bamutil.

lckarssen avatar lckarssen commented on August 13, 2024

Following up ona @nahmadsen (using Ubuntu 19.10, gcc 9.2.1) I also get the following error messages:

g++  -O4 -pipe -Wall -Werror  -Wno-strict-overflow -I../include -I.   -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS  -o obj/Chromosome.o -c Chromosome.cpp -DVERSION="\"1.0.0\""
Chromosome.cpp: In constructor ‘Chromosome::Chromosome(const string&, unsigned int, bool)’:
Chromosome.cpp:42:15: error: ‘*<unknown>.Chromosome::gs’ is used uninitialized in this function [-Werror=uninitialized]
   42 |     if (this->gs) delete gs;
      |         ~~~~~~^~
cc1plus: all warnings being treated as errors
g++  -std=c++0x -pg -pipe -Wall  -I../../libStatGen/include -I.   -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -DDATE="\"do 13 feb 2020 16:43:11 CET\"" -DVERSION="\"1.0.14\"" -DUSER="\"lennart\""  -o ../bin/profile/bam ../obj/profile/BamExecutable.o ../obj/profile/Validate.o ../obj/profile/Convert.o ../obj/profile/Diff.o ../obj/profile/DumpHeader.o ../obj/profile/SplitChromosome.o ../obj/profile/WriteRegion.o ../obj/profile/DumpIndex.o ../obj/profile/ReadIndexedBam.o ../obj/profile/DumpRefInfo.o ../obj/profile/Filter.o ../obj/profile/ReadReference.o ../obj/profile/Revert.o ../obj/profile/Squeeze.o ../obj/profile/FindCigars.o ../obj/profile/Stats.o ../obj/profile/PileupElementBaseQCStats.o ../obj/profile/ClipOverlap.o ../obj/profile/MateMapByCoord.o ../obj/profile/SplitBam.o ../obj/profile/TrimBam.o ../obj/profile/MergeBam.o ../obj/profile/PolishBam.o ../obj/profile/GapInfo.o ../obj/profile/Logger.o ../obj/profile/Bam2FastQ.o ../obj/profile/Dedup.o ../obj/profile/Dedup_LowMem.o ../obj/profile/Prediction.o ../obj/profile/LogisticRegression.o ../obj/profile/MathCholesky.o ../obj/profile/HashErrorModel.o ../obj/profile/Recab.o ../obj/profile/OverlapHandler.o ../obj/profile/OverlapClipLowerBaseQual.o ../obj/profile/ExplainFlags.o ../obj/profile/Main.o  ../../libStatGen/libStatGen_profile.a -lm -lz  
Main.cpp: In function ‘int main(int, char**)’:
Main.cpp:267:35: warning: catching polymorphic type ‘class std::runtime_error’ by value [-Wcatch-value=]
  267 |         catch (std::runtime_error e)
      |                                   ^
Main.cpp:292:35: warning: catching polymorphic type ‘class std::runtime_error’ by value [-Wcatch-value=]
  292 |         catch (std::runtime_error e)
      |                                   ^

This last one is repeated a couple of times in Main.cpp.

Note that compilation is successful when running

USER_WARNINGS="" make all

from bamutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.