buildroot/package/gqrx/0001-fix_compilation_in_gcc-6.patch
Gwenhael Goavec-Merou 193d83ebd8 gqrx: new package
Gqrx is an open source software defined radio (SDR) receiver implemented
using GNU Radio and the Qt GUI toolkit. Currently it works on Linux
and Mac with hardware supported by gr-osmosdr, including Funcube Dongle,
RTL-SDR, Airspy, HackRF, BladeRF, RFSpace, USRP and SoapySDR.

Gqrx can operate as an AM/FM/SSB receiver with audio output or as an
FFT-only instrument. There are also various hooks for interacting
with external application using network sockets.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
[Thomas:
 - remove unneeded dependency from Config.in, inherited from Qt5
 - add entry to DEVELOPERS file.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-02-12 15:46:12 +01:00

35 lines
1.1 KiB
Diff

From e6baaee4968345a53e977f593362267a91041cff Mon Sep 17 00:00:00 2001
From: Valentin Ochs <a@0au.de>
Date: Fri, 21 Oct 2016 20:12:50 +0200
Subject: [PATCH] Cosmetic & readability changes
Backport patch from
https://github.com/csete/gqrx/commit/e6baaee4968345a53e977f593362267a91041cff
Fix compilation in gcc-6
Signed-off-by: Valentin Ochs <a@0au.de>
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
diff --git a/src/qtgui/plotter.cpp b/src/qtgui/plotter.cpp
index e491632..b877546 100644
--- a/src/qtgui/plotter.cpp
+++ b/src/qtgui/plotter.cpp
@@ -1336,8 +1336,11 @@ void CPlotter::drawOverlay()
#endif
int level = 0;
- for (; level < nLevels && tagEnd[level] > x; level++);
- level %= nLevels;
+ while(level < nLevels && tagEnd[level] > x)
+ level++;
+
+ if(level == nLevels)
+ level = 0;
tagEnd[level] = x + nameWidth + slant - 1;
m_BookmarkTags.append(qMakePair<QRect, qint64>(QRect(x, level * levelHeight, nameWidth + slant, fontHeight), bookmarks[i].frequency));
--
2.10.2