Warnings, deprecated stuff, etc #2

Open
opened 4 years ago by Ghost · 2 comments
Ghost commented 4 years ago

Here are warnings reported by the compiler:

codeine/src/app/xineScope.c:119:33: warning: 'xine_xmalloc' is deprecated [-Wdeprecated-declarations]
   post_plugin_t *post_plugin = xine_xmalloc( sizeof(post_plugin_t) );
                                ^
/usr/include/xine/xineutils.h:189:45: note: 'xine_xmalloc' has been explicitly marked deprecated here
void *xine_xmalloc(size_t size) XINE_MALLOC XINE_DEPRECATED XINE_PROTECTED;
codeine/src/app/videoWindow.cpp:225:12: warning: case value not in enumerated type 'TQEvent::Type' [-Wswitch]
      case VideoWindow::ExposeEvent:
codeine/src/app/stateChange.cpp
/home/cethyel/CMAKE_CONVERSION/codeine/src/app/stateChange.cpp:111:12: warning: enumeration value 'Uninitialised' not handled in switch [-Wswitch]
   switch( state )
           ^
/home/cethyel/CMAKE_CONVERSION/codeine/src/app/stateChange.cpp:151:12: warning: enumeration value 'Uninitialised' not handled in switch [-Wswitch]
   switch( state )
           ^
/home/cethyel/CMAKE_CONVERSION/codeine/src/app/stateChange.cpp:173:15: warning: enumeration value 'Uninitialised' not handled in switch [-Wswitch]
      switch( state ) {
codeine/src/app/analyzer.cpp:11:
/home/cethyel/CMAKE_CONVERSION/codeine/src/app/fht.cpp:179:5: warning: unsequenced modification and access to 'p' [-Wunsequenced]
                *p++ = (*p * *p) + (*q * *q);
codeine/src/app/mainWindow.cpp:706:19: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
   if( mainWindow = (MainWindow*)kapp->mainWidget() )
       ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cethyel/CMAKE_CONVERSION/codeine/src/app/mainWindow.cpp:706:19: note: place parentheses around the assignment to silence this warning
   if( mainWindow = (MainWindow*)kapp->mainWidget() )
                  ^
       (                                           )
/home/cethyel/CMAKE_CONVERSION/codeine/src/app/mainWindow.cpp:706:19: note: use '==' to turn this assignment into an equality comparison
   if( mainWindow = (MainWindow*)kapp->mainWidget() )
codeine/src/app/mainWindow.cpp:707:28: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
      if( actionCollection = mainWindow->actionCollection() )
          ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cethyel/CMAKE_CONVERSION/codeine/src/app/mainWindow.cpp:707:28: note: place parentheses around the assignment to silence this warning
      if( actionCollection = mainWindow->actionCollection() )
                           ^
          (                                                )
/home/cethyel/CMAKE_CONVERSION/codeine/src/app/mainWindow.cpp:707:28: note: use '==' to turn this assignment into an equality comparison
      if( actionCollection = mainWindow->actionCollection() )
Here are warnings reported by the compiler: ``` codeine/src/app/xineScope.c:119:33: warning: 'xine_xmalloc' is deprecated [-Wdeprecated-declarations] post_plugin_t *post_plugin = xine_xmalloc( sizeof(post_plugin_t) ); ^ /usr/include/xine/xineutils.h:189:45: note: 'xine_xmalloc' has been explicitly marked deprecated here void *xine_xmalloc(size_t size) XINE_MALLOC XINE_DEPRECATED XINE_PROTECTED; ``` ``` codeine/src/app/videoWindow.cpp:225:12: warning: case value not in enumerated type 'TQEvent::Type' [-Wswitch] case VideoWindow::ExposeEvent: ``` ``` codeine/src/app/stateChange.cpp /home/cethyel/CMAKE_CONVERSION/codeine/src/app/stateChange.cpp:111:12: warning: enumeration value 'Uninitialised' not handled in switch [-Wswitch] switch( state ) ^ /home/cethyel/CMAKE_CONVERSION/codeine/src/app/stateChange.cpp:151:12: warning: enumeration value 'Uninitialised' not handled in switch [-Wswitch] switch( state ) ^ /home/cethyel/CMAKE_CONVERSION/codeine/src/app/stateChange.cpp:173:15: warning: enumeration value 'Uninitialised' not handled in switch [-Wswitch] switch( state ) { ``` ``` codeine/src/app/analyzer.cpp:11: /home/cethyel/CMAKE_CONVERSION/codeine/src/app/fht.cpp:179:5: warning: unsequenced modification and access to 'p' [-Wunsequenced] *p++ = (*p * *p) + (*q * *q); ``` ``` codeine/src/app/mainWindow.cpp:706:19: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if( mainWindow = (MainWindow*)kapp->mainWidget() ) ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/cethyel/CMAKE_CONVERSION/codeine/src/app/mainWindow.cpp:706:19: note: place parentheses around the assignment to silence this warning if( mainWindow = (MainWindow*)kapp->mainWidget() ) ^ ( ) /home/cethyel/CMAKE_CONVERSION/codeine/src/app/mainWindow.cpp:706:19: note: use '==' to turn this assignment into an equality comparison if( mainWindow = (MainWindow*)kapp->mainWidget() ) ``` ``` codeine/src/app/mainWindow.cpp:707:28: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if( actionCollection = mainWindow->actionCollection() ) ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/cethyel/CMAKE_CONVERSION/codeine/src/app/mainWindow.cpp:707:28: note: place parentheses around the assignment to silence this warning if( actionCollection = mainWindow->actionCollection() ) ^ ( ) /home/cethyel/CMAKE_CONVERSION/codeine/src/app/mainWindow.cpp:707:28: note: use '==' to turn this assignment into an equality comparison if( actionCollection = mainWindow->actionCollection() ) ```
Owner

yeah... not my favorite type of code. Assignment in if condition is something I really dislike. It is so error prone.

I suggest you rework the code to remove them 😄

As for the warning in scope plugin, as we said in IRC please wait till I finish my work on amarok.

yeah... not my favorite type of code. Assignment in if condition is something I really dislike. It is so error prone.<br/> I suggest you rework the code to remove them :smile: As for the warning in scope plugin, as we said in IRC please wait till I finish my work on amarok.
Ghost commented 4 years ago
Poster

As for the warning in scope plugin, as we said in IRC please wait till I finish my work on amarok.

This issue is just a convenient reminder for me, I'll wait for you to fix the xine stuf and Slavek to valid (and make a Deb package) Codeine's conversion to TDE env.

> As for the warning in scope plugin, as we said in IRC please wait till I finish my work on amarok. This issue is just a convenient reminder for me, I'll wait for you to fix the xine stuf and Slavek to valid (and make a Deb package) Codeine's conversion to TDE env.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/codeine#2
Loading…
There is no content yet.