1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added typecasts to avoid gcc 4.5 warnings in switch statements on eKeys variables where additional 'k_...' flags are used

This commit is contained in:
Klaus Schmidinger 2010-12-12 13:42:00 +01:00
parent 1e166490c8
commit 7b77774a99
5 changed files with 21 additions and 19 deletions

View File

@ -6481,7 +6481,7 @@ Video Disk Recorder Revision History
from Osama Alrawab). See INSTALL for information on how to turn this on. from Osama Alrawab). See INSTALL for information on how to turn this on.
- Added Arabian language texts (thanks to Osama Alrawab). - Added Arabian language texts (thanks to Osama Alrawab).
2010-11-07: Version 1.7.17 2010-12-12: Version 1.7.17
- Updated the Estonian OSD texts (thanks to Arthur Konovalov). - Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- Fixed following symbolic links in RemoveFileOrDir() (cont'd) (thanks to - Fixed following symbolic links in RemoveFileOrDir() (cont'd) (thanks to
@ -6507,3 +6507,5 @@ Video Disk Recorder Revision History
Ahrenberg). Ahrenberg).
- Removed displaying the "contents" information from the "Classic VDR" and - Removed displaying the "contents" information from the "Classic VDR" and
"ST:TNG Panels" skins, because it is often wrong and nothing but irritating. "ST:TNG Panels" skins, because it is often wrong and nothing but irritating.
- Added typecasts to avoid gcc 4.5 warnings in switch statements on eKeys
variables where additional 'k_...' flags are used.

20
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 2.24 2010/06/06 09:56:16 kls Exp $ * $Id: menu.c 2.25 2010/12/12 13:36:20 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -606,7 +606,7 @@ void cMenuText::Display(void)
eOSState cMenuText::ProcessKey(eKeys Key) eOSState cMenuText::ProcessKey(eKeys Key)
{ {
switch (Key) { switch (int(Key)) {
case kUp|k_Repeat: case kUp|k_Repeat:
case kUp: case kUp:
case kDown|k_Repeat: case kDown|k_Repeat:
@ -1253,7 +1253,7 @@ void cMenuEvent::Display(void)
eOSState cMenuEvent::ProcessKey(eKeys Key) eOSState cMenuEvent::ProcessKey(eKeys Key)
{ {
switch (Key) { switch (int(Key)) {
case kUp|k_Repeat: case kUp|k_Repeat:
case kUp: case kUp:
case kDown|k_Repeat: case kDown|k_Repeat:
@ -2116,7 +2116,7 @@ void cMenuRecording::Display(void)
eOSState cMenuRecording::ProcessKey(eKeys Key) eOSState cMenuRecording::ProcessKey(eKeys Key)
{ {
switch (Key) { switch (int(Key)) {
case kUp|k_Repeat: case kUp|k_Repeat:
case kUp: case kUp:
case kDown|k_Repeat: case kDown|k_Repeat:
@ -3614,7 +3614,7 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
cChannel *NewChannel = NULL; cChannel *NewChannel = NULL;
if (Key != kNone) if (Key != kNone)
lastTime.Set(); lastTime.Set();
switch (Key) { switch (int(Key)) {
case k0: case k0:
if (number == 0) { if (number == 0) {
// keep the "Toggle channels" function working // keep the "Toggle channels" function working
@ -3818,7 +3818,7 @@ void cDisplayVolume::Process(eKeys Key)
eOSState cDisplayVolume::ProcessKey(eKeys Key) eOSState cDisplayVolume::ProcessKey(eKeys Key)
{ {
switch (Key) { switch (int(Key)) {
case kVolUp|k_Repeat: case kVolUp|k_Repeat:
case kVolUp: case kVolUp:
case kVolDn|k_Repeat: case kVolDn|k_Repeat:
@ -3914,7 +3914,7 @@ eOSState cDisplayTracks::ProcessKey(eKeys Key)
{ {
int oldTrack = track; int oldTrack = track;
int oldAudioChannel = audioChannel; int oldAudioChannel = audioChannel;
switch (Key) { switch (int(Key)) {
case kUp|k_Repeat: case kUp|k_Repeat:
case kUp: case kUp:
case kDown|k_Repeat: case kDown|k_Repeat:
@ -4031,7 +4031,7 @@ void cDisplaySubtitleTracks::Process(eKeys Key)
eOSState cDisplaySubtitleTracks::ProcessKey(eKeys Key) eOSState cDisplaySubtitleTracks::ProcessKey(eKeys Key)
{ {
int oldTrack = track; int oldTrack = track;
switch (Key) { switch (int(Key)) {
case kUp|k_Repeat: case kUp|k_Repeat:
case kUp: case kUp:
case kDown|k_Repeat: case kDown|k_Repeat:
@ -4754,7 +4754,7 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
return osContinue; return osContinue;
} }
bool DoShowMode = true; bool DoShowMode = true;
switch (Key) { switch (int(Key)) {
// Positioning: // Positioning:
case kPlay: case kPlay:
case kUp: Play(); break; case kUp: Play(); break;
@ -4781,7 +4781,7 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
return osEnd; return osEnd;
default: { default: {
DoShowMode = false; DoShowMode = false;
switch (Key) { switch (int(Key)) {
// Editing: // Editing:
case kMarkToggle: MarkToggle(); break; case kMarkToggle: MarkToggle(); break;
case kPrev|k_Repeat: case kPrev|k_Repeat:

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menuitems.c 2.7 2010/06/06 10:37:08 kls Exp $ * $Id: menuitems.c 2.8 2010/12/12 13:41:09 kls Exp $
*/ */
#include "menuitems.h" #include "menuitems.h"
@ -527,7 +527,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
Set(); Set();
return osContinue; return osContinue;
} }
switch (Key) { switch (int(Key)) {
case kRed: // Switch between upper- and lowercase characters case kRed: // Switch between upper- and lowercase characters
if (InEditMode()) { if (InEditMode()) {
if (!insert || !newchar) { if (!insert || !newchar) {
@ -733,7 +733,7 @@ eOSState cMenuEditChanItem::ProcessKey(eKeys Key)
{ {
int delta = 1; int delta = 1;
switch (Key) { switch (int(Key)) {
case kLeft|k_Repeat: case kLeft|k_Repeat:
case kLeft: delta = -1; case kLeft: delta = -1;
case kRight|k_Repeat: case kRight|k_Repeat:

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: osdbase.c 2.2 2010/01/17 11:36:12 kls Exp $ * $Id: osdbase.c 2.3 2010/12/12 13:41:28 kls Exp $
*/ */
#include "osdbase.h" #include "osdbase.h"
@ -500,7 +500,7 @@ eOSState cOsdMenu::ProcessKey(eKeys Key)
return state; return state;
} }
} }
switch (Key) { switch (int(Key)) {
case k0: return osUnknown; case k0: return osUnknown;
case k1...k9: return hasHotkeys ? HotKey(Key) : osUnknown; case k1...k9: return hasHotkeys ? HotKey(Key) : osUnknown;
case kUp|k_Repeat: case kUp|k_Repeat:

6
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.tvdr.de * The project's page is at http://www.tvdr.de
* *
* $Id: vdr.c 2.19 2010/04/05 10:06:16 kls Exp $ * $Id: vdr.c 2.20 2010/12/12 13:42:00 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -937,7 +937,7 @@ int main(int argc, char *argv[])
ShutdownHandler.SetUserInactiveTimeout(); ShutdownHandler.SetUserInactiveTimeout();
} }
// Keys that must work independent of any interactive mode: // Keys that must work independent of any interactive mode:
switch (key) { switch (int(key)) {
// Menu control: // Menu control:
case kMenu: { case kMenu: {
key = kNone; // nobody else needs to see this key key = kNone; // nobody else needs to see this key
@ -1185,7 +1185,7 @@ int main(int argc, char *argv[])
cRemote::PutMacro(key); cRemote::PutMacro(key);
key = kNone; key = kNone;
} }
switch (key) { switch (int(key)) {
// Toggle channels: // Toggle channels:
case kChanPrev: case kChanPrev:
case k0: { case k0: {