openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

Warnings general

Open dimitre opened this issue 2 years ago • 6 comments

I've spent some time to fix warnings, I think they get in the way of you reading important things on screen. So I've just finished a lot of changes that can help clearing space.

XCode

No warnings anymore after the following PRs are merged. I think they can be reviewed and merged as one. cc: @ofTheo @2bbb @danoli3

  • [ ] https://github.com/openframeworks/openFrameworks/issues/7392
  • [x] https://github.com/openframeworks/openFrameworks/pull/7083
  • [x] https://github.com/openframeworks/openFrameworks/pull/6935 - https://github.com/openframeworks/openFrameworks/issues/6925
  • [x] https://github.com/openframeworks/openFrameworks/pull/7026
  • [x] https://github.com/openframeworks/openFrameworks/issues/6977
  • [x] https://github.com/openframeworks/openFrameworks/issues/6926
  • [x] https://github.com/openframeworks/openFrameworks/pull/6927
  • [x] https://github.com/openframeworks/openFrameworks/pull/6937
  • [x] https://github.com/openframeworks/openFrameworks/pull/6921
  • [x] Removing QTKit as a framework
  • [x] https://github.com/openframeworks/openFrameworks/pull/6924
  • [x] https://github.com/openframeworks/openFrameworks/pull/6922
  • [x] https://github.com/openframeworks/openFrameworks/pull/6995

General code

  • [x] https://github.com/openframeworks/openFrameworks/pull/6880
  • [x] https://github.com/openframeworks/openFrameworks/pull/6916
  • [x] https://github.com/openframeworks/openFrameworks/pull/6877
  • [x] https://github.com/openframeworks/openFrameworks/pull/6878
  • [x] silence OpenGL deprecation
  • [x] https://github.com/openframeworks/openFrameworks/pull/6918
  • [x] https://github.com/openframeworks/openFrameworks/pull/6917

Related

And other thing that can be fixed soon is this (int to size_t convesion):

  • [x] https://github.com/openframeworks/openFrameworks/issues/6866#issuecomment-1061906274 Silence temporarly this hundreds of messages :

dimitre avatar Apr 05 '22 15:04 dimitre

Implicit conversion loses integer precision: 'std::vector<ofxOscMessage>::size_type' (aka 'unsigned long') to 'int' https://github.com/openframeworks/openFrameworks/blob/290dbfc23930425024c9456b5c5519611fb1990d/addons/ofxOsc/src/ofxOscBundle.cpp#L46-L54

dimitre avatar Apr 07 '22 03:04 dimitre

Implicit conversion loses integer precision: 'unsigned long' to 'osc::osc_bundle_element_size_t' (aka 'int') https://github.com/openframeworks/openFrameworks/blob/290dbfc23930425024c9456b5c5519611fb1990d/addons/ofxOsc/src/ofxOscSender.cpp#L238

dimitre avatar Apr 07 '22 03:04 dimitre

in MSYS2 : warning : ignoring attributes on template argument

E:/openframeworks/libs/openFrameworks/utils/ofUtils.h:603:60: warning: ignoring attributes on template argument 'va_list' {aka 'char*'} [-Wignored-attributes]
  603 |     -> typename std::enable_if<std::is_same<va_list, VAList>::value, std::string>::type

oxillo avatar Jun 01 '22 19:06 oxillo

in MSYS2 : warning: 'mode' may be used uninitialized [-Wmaybe-uninitialized]

[...]/openFrameworks/libs/openFrameworks/communication/ofArduino.cpp: In member function 'virtual void ofArduino::processSysExData(std::vector<unsigned char>)':
[...]/openFrameworks/libs/openFrameworks/communication/ofArduino.cpp:955:35: note: 'mode' was declared here
  955 |                 Firmata_Pin_Modes mode;

oxillo avatar Mar 26 '23 17:03 oxillo

in MSYS2 : warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long long unsigned int'} [-Wsign-compare]

[...]/openFrameworks/libs/openFrameworks/gl/ofMaterial.cpp:574:34: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long long unsigned int'} [-Wsign-compare]
  574 |                 for(int i = 0; i < mtsSize; i++ ) {
      |                                ~~^~~~~~~~~

oxillo avatar Mar 26 '23 17:03 oxillo

in MSYS2 : unused variable warning in ofFileUtils.cpp

[...]/openFrameworks/libs/openFrameworks/utils/ofFileUtils.cpp:696:14: warning: unused variable 'perm' [-Wunused-variable]

oxillo avatar Mar 26 '23 17:03 oxillo