Ticket #12996: v2-0009-Remove-unused-code-fragment.patch

File v2-0009-Remove-unused-code-fragment.patch, 1.4 KB (added by David Hampton <mythtv@…>, 7 years ago)

Remove unused code fragment in upnpdevice.cpp.

  • mythtv/libs/libmythupnp/upnpdevice.cpp

    Remove unused code fragment.
    
    Remove code that computes the proper string for outputting an IP
    address and then never uses that string. Comment out the unused
    variable names.
    ---
     mythtv/libs/libmythupnp/upnpdevice.cpp | 15 +--------------
     1 file changed, 1 insertion(+), 14 deletions(-)
    
    diff --git a/mythtv/libs/libmythupnp/upnpdevice.cpp b/mythtv/libs/libmythupnp/upnpdevice.cpp
    index 1e9371d..6ffc736 100644
    a b QString UPnpDeviceDesc::GetValidXML( const QString &sBaseAddress, int nPort ) 
    335335/////////////////////////////////////////////////////////////////////////////
    336336
    337337void UPnpDeviceDesc::GetValidXML(
    338     const QString &sBaseAddress, int nPort,
     338    const QString &/*sBaseAddress*/, int /*nPort*/,
    339339    QTextStream &os, const QString &sUserAgent )
    340340{
    341341#if 0
    342342    os.setEncoding( QTextStream::UnicodeUTF8 );
    343343#endif
    344 
    345     QString BaseAddr;
    346     QHostAddress addr(sBaseAddress);
    347 
    348     BaseAddr = sBaseAddress;
    349 
    350 #if !defined(QT_NO_IPV6)
    351     // Basically if it appears to be an IPv6 IP surround the IP with []
    352     //  otherwise don't bother
    353     if (sBaseAddress.contains(":"))
    354         BaseAddr = "[" + sBaseAddress + "]";
    355 #endif
    356 
    357344    os << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
    358345          "<root xmlns=\"urn:schemas-upnp-org:device-1-0\" "
    359346          " xmlns:mythtv=\"mythtv.org\">\n"