use %zd for ssize_t and %zu for size_t
authorAndreas Oberritter <obi@opendreambox.org>
Mon, 3 Jan 2011 14:52:51 +0000 (15:52 +0100)
committerAndreas Oberritter <obi@opendreambox.org>
Wed, 19 Jan 2011 03:24:23 +0000 (04:24 +0100)
lib/dvb/dvb.cpp
lib/dvb/esection.h
lib/dvb/scan.cpp
lib/dvb_ci/dvbci.cpp
lib/python/Plugins/Extensions/SocketMMI/src/socket_mmi.cpp
lib/service/servicedvb.cpp
lib/service/servicedvbrecord.cpp

index 414ab8da7d9419f37b86d722bf7617523ccb3cea..cd6c232b13f44087208a21c31b68fec5e72564b8 100644 (file)
@@ -108,7 +108,7 @@ eDVBResourceManager::eDVBResourceManager()
                        m_boxtype = DM8000;
        }
 
-       eDebug("found %d adapter, %d frontends(%d sim) and %d demux, boxtype %d",
+       eDebug("found %zd adapter, %zd frontends(%zd sim) and %zd demux, boxtype %d",
                m_adapter.size(), m_frontend.size(), m_simulate_frontend.size(), m_demux.size(), m_boxtype);
 
        eDVBCAService::registerChannelCallback(this);
@@ -334,7 +334,7 @@ PyObject *eDVBResourceManager::setFrontendSlotInformations(ePyObject list)
        }
        if (assigned != m_frontend.size()) {
                char blasel[256];
-               sprintf(blasel, "eDVBResourceManager::setFrontendSlotInformations .. assigned %d socket informations, but %d registered frontends!",
+               sprintf(blasel, "eDVBResourceManager::setFrontendSlotInformations .. assigned %zd socket informations, but %d registered frontends!",
                        m_frontend.size(), assigned);
                PyErr_SetString(PyExc_StandardError, blasel);
                return NULL;
@@ -1488,7 +1488,7 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off
                                size = max;
                        else
                                size = aligned_end - current_offset;
-                       eDebug("HIT, %lld < %lld < %lld, size: %d", i->first, current_offset, i->second, size);
+                       eDebug("HIT, %lld < %lld < %lld, size: %zd", i->first, current_offset, i->second, size);
                        return;
                }
                if (current_offset < aligned_start)
@@ -1529,10 +1529,10 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off
                                        len = aligned_end - aligned_start;
 
                                start = aligned_end - len;
-                               eDebug("skipping to %llx, %d", start, len);
+                               eDebug("skipping to %llx, %zd", start, len);
                        }
 
-                       eDebug("result: %llx, %x (%llx %llx)", start, size, aligned_start, aligned_end);
+                       eDebug("result: %llx, %zx (%llx %llx)", start, size, aligned_start, aligned_end);
                        return;
                }
        }
@@ -1548,7 +1548,7 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off
        {
                start = current_offset;
                size = max;
-               eDebug("NO CUESHEET. (%08llx, %d)", start, size);
+               eDebug("NO CUESHEET. (%08llx, %zd)", start, size);
        } else
        {
                start = current_offset;
index 2bb17a98e5a70fb9321788bc608be7f254351687..833cc93b2ded9216b264350ddccd9e4895038d3a 100644 (file)
@@ -63,7 +63,7 @@ protected:
                        else
                                TABLE_eDebugNoNewLine("-");
                                
-               TABLE_eDebug(" %d/%d TID %02x", avail.size(), max, data[0]);
+               TABLE_eDebug(" %zd/%d TID %02x", avail.size(), max, data[0]);
 
                if (avail.size() == max)
                {
index d559614c61e05cfbc9d457d8ef72ef0752275973..fb6f2048a1367a7694a5ff121a47d0db59dd5fa5 100644 (file)
@@ -193,9 +193,9 @@ RESULT eDVBScan::nextChannel()
        if (m_ch_toScan.empty())
        {
                SCAN_eDebug("no channels left to scan.");
-               SCAN_eDebug("%d channels scanned, %d were unavailable.", 
+               SCAN_eDebug("%zd channels scanned, %zd were unavailable.",
                                m_ch_scanned.size(), m_ch_unavailable.size());
-               SCAN_eDebug("%d channels in database.", m_new_channels.size());
+               SCAN_eDebug("%zd channels in database.", m_new_channels.size());
                m_event(evtFinish);
                return -ENOENT;
        }
index 8a43e5b19219c42f7511a5dd64f7509803b356db..374672ae1903e5dfa01ba8a36bd6907454f2a045 100644 (file)
@@ -739,7 +739,7 @@ PyObject *eDVBCIInterfaces::getDescrambleRules(int slotid)
        if (!slot)
        {
                char tmp[255];
-               snprintf(tmp, 255, "eDVBCIInterfaces::getDescrambleRules try to get rules for CI Slot %d... but just %d slots are available", slotid, m_slots.size());
+               snprintf(tmp, 255, "eDVBCIInterfaces::getDescrambleRules try to get rules for CI Slot %d... but just %zd slots are available", slotid, m_slots.size());
                PyErr_SetString(PyExc_StandardError, tmp);
                return 0;
        }
@@ -791,7 +791,7 @@ RESULT eDVBCIInterfaces::setDescrambleRules(int slotid, SWIG_PYOBJECT(ePyObject)
        if (!slot)
        {
                char tmp[255];
-               snprintf(tmp, 255, "eDVBCIInterfaces::setDescrambleRules try to set rules for CI Slot %d... but just %d slots are available", slotid, m_slots.size());
+               snprintf(tmp, 255, "eDVBCIInterfaces::setDescrambleRules try to set rules for CI Slot %d... but just %zd slots are available", slotid, m_slots.size());
                PyErr_SetString(PyExc_StandardError, tmp);
                return -1;
        }
@@ -862,7 +862,7 @@ RESULT eDVBCIInterfaces::setDescrambleRules(int slotid, SWIG_PYOBJECT(ePyObject)
                if (PyTuple_Size(tuple) != 2)
                {
                        char buf[255];
-                       snprintf(buf, 255, "eDVBCIInterfaces::setDescrambleRules provider tuple has %d instead of 2 entries!!", PyTuple_Size(tuple));
+                       snprintf(buf, 255, "eDVBCIInterfaces::setDescrambleRules provider tuple has %zd instead of 2 entries!!", PyTuple_Size(tuple));
                        PyErr_SetString(PyExc_StandardError, buf);
                        return -1;
                }
@@ -914,7 +914,7 @@ PyObject *eDVBCIInterfaces::readCICaIds(int slotid)
        if (!slot)
        {
                char tmp[255];
-               snprintf(tmp, 255, "eDVBCIInterfaces::readCICaIds try to get CAIds for CI Slot %d... but just %d slots are available", slotid, m_slots.size());
+               snprintf(tmp, 255, "eDVBCIInterfaces::readCICaIds try to get CAIds for CI Slot %d... but just %zd slots are available", slotid, m_slots.size());
                PyErr_SetString(PyExc_StandardError, tmp);
        }
        else
index 673b525c22e82477d2d562fac8c8a19970342a24..9a69de37968ab3fb68b1119c71feb9d9578d7078 100644 (file)
@@ -118,11 +118,11 @@ eAutoInitP0<eSocket_UI> init_socketui(eAutoInitNumbers::rc, "Socket MMI");
 
 int eSocketMMIHandler::send_to_mmisock( void* buf, size_t len)
 {
-       int ret = write(connfd, buf, len);
+       ssize_t ret = write(connfd, buf, len);
        if ( ret < 0 )
                eDebug("[eSocketMMIHandler] write (%m)");
-       else if ( (uint)ret != len )
-               eDebug("[eSocketMMIHandler] only %d bytes sent.. %d bytes should be sent", ret, len );
+       else if ( (size_t)ret != len )
+               eDebug("[eSocketMMIHandler] only %zd bytes sent.. %zu bytes should be sent", ret, len );
        else
                return 0;
        return ret;
index 6a464aff87934fc30f2f2c7aee15a6ee1949a336..2f07ce440f7c5f6ca6b5dab0ea7620fa5e122cab 100644 (file)
@@ -2403,7 +2403,7 @@ void eDVBServicePlay::updateDecoder(bool sendSeekableStateChanged)
                eDebug("getting program info failed.");
        else
        {
-               eDebugNoNewLine("have %d video stream(s)", program.videoStreams.size());
+               eDebugNoNewLine("have %zd video stream(s)", program.videoStreams.size());
                if (!program.videoStreams.empty())
                {
                        eDebugNoNewLine(" (");
@@ -2422,7 +2422,7 @@ void eDVBServicePlay::updateDecoder(bool sendSeekableStateChanged)
                        }
                        eDebugNoNewLine(")");
                }
-               eDebugNoNewLine(", and %d audio stream(s)", program.audioStreams.size());
+               eDebugNoNewLine(", and %zd audio stream(s)", program.audioStreams.size());
                if (!program.audioStreams.empty())
                {
                        eDebugNoNewLine(" (");
@@ -2599,7 +2599,7 @@ void eDVBServicePlay::loadCuesheet()
                        m_cue_entries.insert(cueEntry(where, what));
                }
                fclose(f);
-               eDebug("%d entries", m_cue_entries.size());
+               eDebug("%zd entries", m_cue_entries.size());
        } else
                eDebug("cutfile not found!");
        
index 419c26bab2149f2ac60fcd26a9841af88d56437f..08cd24710e89e4978ed2b0f720f458eff5faaa72 100644 (file)
@@ -313,7 +313,7 @@ int eDVBServiceRecord::doRecord()
 
                        int timing_pid = -1, timing_pid_type = -1;
 
-                       eDebugNoNewLine("RECORD: have %d video stream(s)", program.videoStreams.size());
+                       eDebugNoNewLine("RECORD: have %zd video stream(s)", program.videoStreams.size());
                        if (!program.videoStreams.empty())
                        {
                                eDebugNoNewLine(" (");
@@ -335,7 +335,7 @@ int eDVBServiceRecord::doRecord()
                                }
                                eDebugNoNewLine(")");
                        }
-                       eDebugNoNewLine(", and %d audio stream(s)", program.audioStreams.size());
+                       eDebugNoNewLine(", and %zd audio stream(s)", program.audioStreams.size());
                        if (!program.audioStreams.empty())
                        {
                                eDebugNoNewLine(" (");