Fix signed integer warning; debian build hardening debian-1.0.0-1 v1.0.0
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 5 Oct 2013 21:11:10 +0000 (15:11 -0600)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 5 Oct 2013 21:11:10 +0000 (15:11 -0600)
debian/control
debian/rules
wdq2wav.cpp

index c11accbd6b8acf7945067a09430fbc02211fb63c..69456c36d230e5506ef4631959791292b1da8cba 100644 (file)
@@ -2,7 +2,7 @@ Source: wdq2wav
 Section: contrib/utils
 Priority: extra
 Maintainer: Kevin M. Rosenberg <kmr@debian.org>
-Build-Depends: debhelper (>> 7.0.0)
+Build-Depends: debhelper (>> 7.0.0), hardening-wrapper
 Standards-Version: 3.9.4.0
 Homepage: http://files.b9.com/wdq2wav/
 Vcs-Git: git://git.b9.com/wdq2wav.git
index 477eb79a6c4c56d9015360d3356fd0455eb77008..d3f0854748ce31f1310896623b42f7c580099931 100755 (executable)
@@ -11,6 +11,15 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s
 endif
 
+export DEB_BUILD_HARDENING=1
+export DPKG_EXPORT_BUILDFLAGS=1
+export DEB_BUILD_MAINT_OPTIONS="hardening=+all" 
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir
@@ -37,7 +46,7 @@ install: build
        dh_prep
        dh_installdirs
        DPKG_EXPORT_BUILDFLAGS=1
-       env DEB_BUILD_MAINT_OPTIONS="hardening=+all" DPKG_EXPORT_BUILDFLAGS=1 CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" $(MAKE)
+       $(MAKE)
        dh_install wdq2wav usr/bin
 
 binary-indep: 
index 81b1c9cc57ecc7727c2bb6fb22daac88b047d331..ad977f2f4c5fc57d60556fdec9dff89914d6540b 100644 (file)
@@ -287,7 +287,7 @@ wdq2wav (const char* wdq_fname, const int channel, const char *wav_fname, bool p
   if (! g_dry_run && !g_dont_demean) {
     std::cout << " (removing)\n";
     int mean = nearest<int>(wdq_channel.m_raw_mean);
-    for (int i = 0; i < wdq.m_nSamples; i++)
+    for (unsigned int i = 0; i < wdq.m_nSamples; i++)
       wdq_channel.m_data[i] -= mean;
   } else {
     std::cout << " (not removing)\n";