]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
These are some of Lee's warning cleanups - eliminating dead code that has no effect.
authorAidan Van Dyk <aidan@ifax.com>
Fri, 21 Jul 2006 17:55:20 +0000 (17:55 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Fri, 21 Jul 2006 17:55:20 +0000 (17:55 +0000)
faxd/Class1.c++
faxd/Class1Recv.c++
faxd/Class1Send.c++
faxd/faxGettyApp.c++
faxd/faxQueueApp.c++
util/FaxParams.c++

index d91bdddfab834ce130988f9456678142003d302c..eeaaa62d0e56bedf7ae4171b74c2c7f22b9defc9 100644 (file)
@@ -569,7 +569,6 @@ Class1Modem::waitForDCEChannel(bool awaitctrl)
                    gotEOT = true;
                    recvdDCN = true;
                    return (false);
-                   break;
                case 0x69:
                    protoTrace("Control channel retrain");
                    // wait for the control channel to reappear
@@ -577,17 +576,14 @@ Class1Modem::waitForDCEChannel(bool awaitctrl)
                    gotresponse = waitForDCEChannel(true);
                    gotRTNC = true;
                    return ((awaitctrl ? gotresponse : false));
-                   break;
                case 0x6B:
                    protoTrace("Primary channel selected");
                    gotCTRL = false;
                    continue;
-                   break;
                case 0x6D:
                    protoTrace("Control channel selected");
                    gotCTRL = true;
                    continue;
-                   break;
                case 0x6E:                      // 1200 bit/s
                case 0x6F:                      // 2400 bit/s
                    // control rate indication
@@ -597,7 +593,6 @@ Class1Modem::waitForDCEChannel(bool awaitctrl)
                    }
                    if (awaitctrl) gotresponse = true;
                    continue;
-                   break;
                case 0x70:                      //  2400 bit/s
                case 0x71:                      //  4800 bit/s
                case 0x72:                      //  7200 bit/s
@@ -619,7 +614,6 @@ Class1Modem::waitForDCEChannel(bool awaitctrl)
                    }
                    if (!awaitctrl) gotresponse = true;
                    continue;
-                   break;
                default:
                    // unexpected <DLE><command>, deem as garbage
                    garbage.append(DLE);
@@ -738,7 +732,6 @@ Class1Modem::recvRawFrame(HDLCFrame& frame)
                    gotEOT = true;
                    recvdDCN = true;
                    return (false);
-                   break;
                case 0x69:
                    protoTrace("Control channel retrain");
                    // wait for the control channel to reappear
@@ -746,7 +739,6 @@ Class1Modem::recvRawFrame(HDLCFrame& frame)
                    waitForDCEChannel(true);
                    gotRTNC = true;
                    return (false);
-                   break;
                default:
                    // unexpected <DLE><command>, deem as garbage
                    garbage.append(DLE);
@@ -805,7 +797,6 @@ Class1Modem::recvRawFrame(HDLCFrame& frame)
                            gotEOT = true;
                            recvdDCN = true;
                            return (false);
-                           break;
                        case DLE:       // <DLE><DLE> => <DLE>
                            break;
                        case SUB:       // <DLE><SUB> => <DLE><DLE>
index 81c635ac5501cb9d4255890cecc1a6af9f745c6c..2473ea21b06d41823ea7ffb14fdc0b6e539ee216 100644 (file)
@@ -1148,7 +1148,6 @@ Class1Modem::recvPageECMData(TIFF* tif, const Class2Params& params, fxStr& emsg)
                                    gotEOT = true;
                                    recvdDCN = true;
                                    continue;
-                                   break;
                                default:
                                    // The message is not ECM-specific: fall out of ECM receive, and let
                                    // the earlier message-handling routines try to cope with the signal.
@@ -1157,7 +1156,6 @@ Class1Modem::recvPageECMData(TIFF* tif, const Class2Params& params, fxStr& emsg)
                                    prevPage--;         // counteract the forthcoming increment
                                    // maybe we should save an unconfirmed page here?
                                    return (true);
-                                   break;
                            }
                            if (!sendERR) {     // as long as we're not trying to send the ERR signal (set above)
                                if (useV34) gotprimary = waitForDCEChannel(false);
@@ -1593,7 +1591,6 @@ Class1Modem::recvPageECMData(TIFF* tif, const Class2Params& params, fxStr& emsg)
                            prevPage--;         // counteract the forthcoming increment
                            // maybe we should save an unconfirmed page here?
                            return (true);
-                           break;
                    }
                } else {
                    emsg = "T.30 T2 timeout, expected signal not received";
index 99ed36d729b53dec7647cc471154fd934f2d7ad9..815d79e43e4948be1c17bc9a6300c231cde46f2f 100644 (file)
@@ -1284,7 +1284,6 @@ Class1Modem::blockFrame(const u_char* bitrev, bool lastframe, u_int ppmcmd, fxSt
                                emsg = "COMREC invalid response received to RR.";
                                protoTrace(emsg);
                                return (false);
-                               break;
                        }
                    } while (!gotppr);          
                }
@@ -1508,7 +1507,6 @@ Class1Modem::blockFrame(const u_char* bitrev, bool lastframe, u_int ppmcmd, fxSt
                                                emsg = "COMREC invalid response received to RR.";
                                                protoTrace(emsg);
                                                return (false);
-                                               break;
                                        }
                                    } while (!goterr);          
                                }
index 85af67f2e3ed64427e6f2d0e8b2385314e02fdb7..9021e8b46c35fbc75c651557c96a7b8cacd55901 100644 (file)
@@ -345,7 +345,7 @@ faxGettyApp::answerPhone(AnswerType atype, CallType ctype, const CallID& callid,
        fxStr cmd(dynamicConfig | quote | getModemDevice() | enquote | callid_formatted);
        traceServer("DynamicConfig: %s", (const char*)cmd);
        fxStr localid = "";
-       int pipefd[2], idlength, status;
+       int pipefd[2], status;
        char line[1024];
        pipe(pipefd);
        pid_t pid = fork();
index 23dd27cd975b9d7d2d5909806bbf13aca18d4ccc..31e32e083c42ba43f3c2ca2d1c3c63391cfb174f 100644 (file)
@@ -374,14 +374,12 @@ faxQueueApp::prepareJobStart(Job& job, FaxRequest* req,
            Sys::now() + random() % requeueInterval);
        delete req;
        return false;
-       break;
     default:                           // parent, setup handler to wait
        job.startPrepare(pid);
        delete req;                     // must reread after preparation
        job.breq = NULL;
        Trigger::post(Trigger::JOB_PREP_BEGIN, job);
        return true;
-       break;
     }
 }
 
@@ -401,7 +399,6 @@ faxQueueApp::prepareJobDone(Job& job, int status)
        status = Job::failed;
     } else
        status >>= 8;
-    bool abort = true;
     if (job.suspendPending) {          // co-thread waiting
        job.suspendPending = false;
        releaseModem(job);
index ed977e2747163192032b70d4b443bdc84d9fcfd0..fde8dc3332e235dc59c7219e74c2eefe080ccae0 100644 (file)
@@ -224,8 +224,6 @@ void FaxParams::asciiDecode(const char* dcs)
 {
     u_int byte = 0;
     while (dcs[0] != '\0' && dcs[1] != '\0') {
-       u_char value = 0;
-       value = 2;
        m_bits[byte] = ((dcs[0] - (dcs[0] > 64 ? 55 : 48)) << 4) + (dcs[1] - (dcs[1] > 64 ? 55 : 48));
        setExtendBits(byte++);
        dcs += 2;