OSDN Git Service

client/transfer: Return "error" for unknown status in status2str
authorSzymon Janc <szymon.janc@tieto.com>
Fri, 4 Oct 2013 09:05:35 +0000 (11:05 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 4 Oct 2013 11:10:33 +0000 (14:10 +0300)
This can happen only if there is a bug in obexd code.
This fix following build error:

  CC     obexd/client/obexd-transfer.o
obexd/client/transfer.c: In function ‘status2str’:
obexd/client/transfer.c:277:1: error: control reaches end of non-void
    function [-Werror=return-type]

obexd/client/transfer.c

index 99a17e9..5a8d4f2 100644 (file)
@@ -272,6 +272,7 @@ static const char *status2str(uint8_t status)
        case TRANSFER_STATUS_COMPLETE:
                return "complete";
        case TRANSFER_STATUS_ERROR:
+       default:
                return "error";
        }
 }