Skip to content

Commit

Permalink
[mtpresponder] Cleanup -Wimplicit-fallthrough warnings
Browse files Browse the repository at this point in the history
Build uses -Wextra, which implies -Wimplicit-fallthrough=3, which
is picky enough not to accept 'fall through' as intentionality hint
and leads to compilation time warnings.

Use "FALLTHRU" which is ok for all implicit-fallthrough levels that
accept comments in addition to attributes.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Aug 20, 2020
1 parent 5f8a96f commit 74f63e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion mts/platform/storage/fsstorageplugin/fsstorageplugin.cpp
@@ -1,7 +1,8 @@
/*
* This file is part of libmeegomtp package
*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (c) 2010 Nokia Corporation. All rights reserved.
* Copyright (c) 2013 - 2020 Jolla Ltd.
* Copyright (c) 2020 Open Mobile Platform LLC.
*
* Contact: Deepak Kodihalli <deepak.kodihalli@nokia.com>
Expand Down Expand Up @@ -224,6 +225,7 @@ static time_t datetime_to_time_t(const char *dt)

case '-':
east = false;
/* FALLTHRU */
case '+':
/* Localtime + utc offset */
++pos;
Expand Down
6 changes: 4 additions & 2 deletions mts/protocol/mtpresponder.cpp
@@ -1,7 +1,9 @@
/*
* This file is part of libmeegomtp package
*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (c) 2010 Nokia Corporation. All rights reserved.
* Copyright (c) 2013 - 2020 Jolla Ltd.
* Copyright (c) 2020 Open Mobile Platform LLC.
*
* Contact: Santosh Puranik <santosh.puranik@nokia.com>
*
Expand Down Expand Up @@ -3098,7 +3100,7 @@ void MTPResponder::dispatchEvent(MTPEventCode event, const QVector<quint32> &par
switch( event ) {
case MTP_EV_ObjectAdded:
filteringAllowed = false;
// fall throught
// FALLTHRU
case MTP_EV_ObjectRemoved:
case MTP_EV_ObjectInfoChanged:
case MTP_EV_ObjectPropChanged:
Expand Down

0 comments on commit 74f63e0

Please sign in to comment.