Commit 4327797e authored by DreamSourceLab's avatar DreamSourceLab

Warnings fix

parent 45abe48a
......@@ -20,14 +20,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <libsigrok4DSL/libsigrok.h>
#ifdef ENABLE_DECODE
#include <libsigrokdecode4DSL/libsigrokdecode.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
#include <libsigrokdecode4DSL/libsigrokdecode.h>
#endif
#include <stdint.h>
#include <libsigrok4DSL/libsigrok.h>
#include <getopt.h>
#include <QApplication>
......
......@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "analog.h"
#include "analogsnapshot.h"
......
......@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <extdef.h>
#include <assert.h>
......
......@@ -24,6 +24,8 @@
#ifndef DSVIEW_PV_DATA_ANALOGSNAPSHOT_H
#define DSVIEW_PV_DATA_ANALOGSNAPSHOT_H
#include <libsigrok4DSL/libsigrok.h>
#include "snapshot.h"
#include <utility>
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <libsigrok4DSL/libsigrok.h>
#include <libsigrokdecode4DSL/libsigrokdecode.h>
#include "decoder.h"
......
......@@ -18,6 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <boost/foreach.hpp>
#include <boost/thread/thread.hpp>
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "dso.h"
#include "dsosnapshot.h"
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <extdef.h>
#include <assert.h>
......
......@@ -23,11 +23,12 @@
#ifndef DSVIEW_PV_DATA_DSOSNAPSHOT_H
#define DSVIEW_PV_DATA_DSOSNAPSHOT_H
#include "snapshot.h"
#include <utility>
#include <vector>
#include <libsigrok4DSL/libsigrok.h>
#include "snapshot.h"
namespace DsoSnapshotTest {
class Basic;
}
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "group.h"
#include "groupsnapshot.h"
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <extdef.h>
#include <assert.h>
......
......@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "logic.h"
#include "logicsnapshot.h"
......
......@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <extdef.h>
#include <QDebug>
......@@ -662,7 +661,7 @@ bool LogicSnapshot::block_nxt_edge(uint64_t *lbp, uint64_t &index, uint64_t bloc
{
unsigned int level = min_level;
bool fast_forward = true;
const uint64_t last = last_sample ? ~0ULL : 0;
const uint64_t last = last_sample ? ~0ULL : 0ULL;
//----- Search Next Edge Within Current LeafBlock -----//
if (level == 0)
......@@ -704,7 +703,7 @@ bool LogicSnapshot::block_nxt_edge(uint64_t *lbp, uint64_t &index, uint64_t bloc
// Check if there was a change in this block
if (sample) {
index = (index & (~0 << (level + 1)*ScalePower)) + (bsf_folded(sample) << level*ScalePower);
index = (index & (~0ULL << (level + 1)*ScalePower)) + (bsf_folded(sample) << level*ScalePower);
break;
} else {
index = ((index >> (level + 1)*ScalePower) + 1) << (level + 1)*ScalePower;
......@@ -730,7 +729,7 @@ bool LogicSnapshot::block_nxt_edge(uint64_t *lbp, uint64_t &index, uint64_t bloc
// Update the low level position of the change in this block
if (level == 0 ? sample ^ last : sample) {
index = (index & (~0 << (level + 1)*ScalePower)) + (bsf_folded(level == 0 ? sample ^ last : sample) << level*ScalePower);
index = (index & (~0ULL << (level + 1)*ScalePower)) + (bsf_folded(level == 0 ? sample ^ last : sample) << level*ScalePower);
if (level == min_level)
break;
}
......@@ -747,7 +746,7 @@ bool LogicSnapshot::block_pre_edge(uint64_t *lbp, uint64_t &index, bool last_sam
unsigned int level = min_level;
bool fast_forward = true;
const uint64_t last = last_sample ? ~0ULL : 0;
const uint64_t last = last_sample ? ~0ULL : 0ULL;
uint64_t block_start = index & ~LeafMask;
//----- Search Next Edge Within Current LeafBlock -----//
......@@ -801,7 +800,7 @@ bool LogicSnapshot::block_pre_edge(uint64_t *lbp, uint64_t &index, bool last_sam
// Check if there was a change in this block
if (sample) {
index = (index & (~0 << (level + 1)*ScalePower)) +
index = (index & (~0ULL << (level + 1)*ScalePower)) +
(bsr64(sample) << level*ScalePower) +
~(~0ULL << level*ScalePower);
break;
......@@ -832,7 +831,7 @@ bool LogicSnapshot::block_pre_edge(uint64_t *lbp, uint64_t &index, bool last_sam
// Update the low level position of the change in this block
if (level == 0 ? sample ^ last : sample) {
index = (index & (~0 << (level + 1)*ScalePower)) +
index = (index & (~0ULL << (level + 1)*ScalePower)) +
(bsr64(level == 0 ? sample ^ last : sample) << level*ScalePower) +
~(~0ULL << level*ScalePower);
if (level == min_level) {
......@@ -840,7 +839,7 @@ bool LogicSnapshot::block_pre_edge(uint64_t *lbp, uint64_t &index, bool last_sam
break;
}
} else {
index = (index & (~0 << (level + 1)*ScalePower));
index = (index & (~0ULL << (level + 1)*ScalePower));
}
}
}
......
......@@ -24,6 +24,8 @@
#ifndef DSVIEW_PV_DATA_LOGICSNAPSHOT_H
#define DSVIEW_PV_DATA_LOGICSNAPSHOT_H
#include <libsigrok4DSL/libsigrok.h>
#include "snapshot.h"
#include <QString>
......
......@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mathstack.h"
#include <boost/foreach.hpp>
......
......@@ -20,12 +20,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef DSVIEW_PV_DATA_SNAPSHOT_H
#define DSVIEW_PV_DATA_SNAPSHOT_H
#include <libsigrok4DSL/libsigrok.h>
#include <boost/thread.hpp>
namespace pv {
......
......@@ -21,8 +21,6 @@
#include <sstream>
#include <libsigrok4DSL/libsigrok.h>
#include "device.h"
using std::ostringstream;
......
......@@ -19,12 +19,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <cassert>
#include <QDebug>
#include <libsigrok4DSL/libsigrok.h>
#include "devinst.h"
#include <pv/sigsession.h>
......
......@@ -22,16 +22,16 @@
#ifndef DSVIEW_PV_DEVICE_DEVINST_H
#define DSVIEW_PV_DEVICE_DEVINST_H
#include <string>
#include <boost/shared_ptr.hpp>
#include <QObject>
#include <string>
#include <glib.h>
#include <stdint.h>
#include <libsigrok4DSL/libsigrok.h>
struct sr_dev_inst;
struct sr_channel;
struct sr_channel_group;
......
......@@ -29,8 +29,6 @@
#include <boost/filesystem.hpp>
#include <libsigrok4DSL/libsigrok.h>
using std::string;
namespace pv {
......
......@@ -20,15 +20,12 @@
*/
#include <cassert>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "inputfile.h"
#include <libsigrok4DSL/libsigrok.h>
using std::string;
namespace pv {
......
......@@ -21,8 +21,6 @@
#include "sessionfile.h"
#include <libsigrok4DSL/libsigrok.h>
namespace pv {
namespace device {
......
......@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "devicemanager.h"
#include "device/devinst.h"
#include "device/device.h"
......@@ -38,8 +37,6 @@
#include <boost/foreach.hpp>
#include <libsigrok4DSL/libsigrok.h>
using boost::shared_ptr;
using std::list;
using std::map;
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "calibration.h"
#include <boost/foreach.hpp>
......@@ -30,7 +29,6 @@
#include <QtConcurrent/QtConcurrent>
#include <QTime>
#include "libsigrok4DSL/libsigrok.h"
#include "../view/trace.h"
using namespace boost;
......
......@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "deviceoptions.h"
#include <boost/foreach.hpp>
......
......@@ -40,8 +40,9 @@
#include <boost/shared_ptr.hpp>
#include <pv/device/devinst.h>
#include <pv/prop/binding/deviceoptions.h>
#include <libsigrok4DSL/libsigrok.h>
#include "../device/devinst.h"
#include "../prop/binding/deviceoptions.h"
#include "../toolbars/titlebar.h"
#include "../dialogs/dsdialog.h"
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "dsomeasure.h"
#include "../device/devinst.h"
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "fftoptions.h"
#include <boost/foreach.hpp>
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "protocolexp.h"
#include <boost/foreach.hpp>
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "protocollist.h"
#include <boost/foreach.hpp>
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "search.h"
#include "../view/logicsignal.h"
......
......@@ -28,8 +28,8 @@
#include <QVBoxLayout>
#include <QGridLayout>
#include <QDialogButtonBox>
#include "../sigsession.h"
#include <libsigrok4DSL/libsigrok.h>
#include "../toolbars/titlebar.h"
#include "dsdialog.h"
#include "../device/devinst.h"
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "waitingdialog.h"
#include <boost/foreach.hpp>
......@@ -31,7 +30,6 @@
#include <QtConcurrent/QtConcurrent>
#include <QVBoxLayout>
#include "libsigrok4DSL/libsigrok.h"
#include "../view/trace.h"
using namespace boost;
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "dsotriggerdock.h"
#include "../sigsession.h"
#include "../device/devinst.h"
......@@ -39,8 +38,6 @@
#include <QVBoxLayout>
#include <QHBoxLayout>
#include "libsigrok4DSL/libsigrok.h"
using namespace boost;
using namespace std;
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef DSVIEW_PV_DSOTRIGGERDOCK_H
#define DSVIEW_PV_DSOTRIGGERDOCK_H
......@@ -32,8 +31,6 @@
#include <vector>
#include <libsigrok4DSL/libsigrok.h>
namespace pv {
class SigSession;
......
......@@ -42,8 +42,6 @@
#include <QRegExpValidator>
#include <QMessageBox>
#include "libsigrok4DSL/libsigrok.h"
using namespace boost;
namespace pv {
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef DSVIEW_PV_MEASUREDOCK_H
#define DSVIEW_PV_MEASUREDOCK_H
......@@ -43,8 +42,6 @@
#include <vector>
#include <libsigrok4DSL/libsigrok.h>
namespace pv {
class SigSession;
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "protocoldock.h"
#include "../sigsession.h"
#include "../view/decodetrace.h"
......
......@@ -40,8 +40,6 @@
#include <vector>
#include <boost/thread.hpp>
#include <libsigrok4DSL/libsigrok.h>
#include "../data/decodermodel.h"
namespace pv {
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "searchdock.h"
#include "../sigsession.h"
#include "../view/cursor.h"
......
......@@ -42,8 +42,6 @@
#include <vector>
#include <libsigrok4DSL/libsigrok.h>
#include "../widgets/fakelineedit.h"
namespace pv {
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "triggerdock.h"
#include "../sigsession.h"
#include "../device/devinst.h"
......
......@@ -43,8 +43,6 @@
#include <vector>
#include <libsigrok4DSL/libsigrok.h>
namespace pv {
class SigSession;
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mainframe.h"
#include "toolbars/titlebar.h"
......
......@@ -83,7 +83,6 @@
#include <stdarg.h>
#include <glib.h>
#include <list>
#include <libsigrok4DSL/libsigrok.h>
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
......
......@@ -30,7 +30,6 @@
#include <QString>
#include <libsigrok4DSL/libsigrok.h>
#include "binding.h"
namespace pv {
......
......@@ -26,7 +26,6 @@
#include "sigsession.h"
#include "mainwindow.h"
#include "devicemanager.h"
#include "device/device.h"
#include "device/file.h"
......
......@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef DSVIEW_PV_SIGSESSION_H
#define DSVIEW_PV_SIGSESSION_H
......
......@@ -19,6 +19,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* __STDC_FORMAT_MACROS is required for PRIu64 and friends (in C++). */
#define __STDC_FORMAT_MACROS
#include "storesession.h"
#include <pv/sigsession.h>
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
#include <boost/shared_ptr.hpp>
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
......
......@@ -19,15 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <extdef.h>
#include <assert.h>
#include <boost/foreach.hpp>
#include <libsigrok4DSL/libsigrok.h>
#include <QAction>
#include <QDebug>
#include <QLabel>
......
......@@ -24,7 +24,6 @@
#define DSVIEW_PV_TOOLBARS_SAMPLINGBAR_H
#include <stdint.h>
#include <list>
#include <map>
......@@ -36,8 +35,6 @@
#include <QAction>
#include <QMenu>
#include <libsigrok4DSL/libsigrok.h>
#include "../sigsession.h"
struct st_dev_inst;
......
......@@ -30,11 +30,6 @@
#include <QApplication>
#include <QPainter>
#ifdef Q_OS_WIN
#pragma comment(lib, "user32.lib")
#include <qt_windows.h>
#endif
namespace pv {
namespace toolbars {
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "trigbar.h"
#include "../sigsession.h"
#include "../device/devinst.h"
......
......@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <extdef.h>
#include <math.h>
......
......@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "cursor.h"
#include "ruler.h"
......
......@@ -18,6 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
extern "C" {
#include <libsigrokdecode4DSL/libsigrokdecode.h>
}
......
......@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "devmode.h"
#include "view.h"
#include "trace.h"
......
......@@ -19,9 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <extdef.h>
#include <math.h>
<