From 206a5d3585fcda50692fae2d60b2fba639c373b1 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 29 Jul 2007 21:59:11 +0000 Subject: [PATCH] move iriver checksums to its own file to remove unneeded inclusion and kill warnings. Tiny whitespace cleanup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14070 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/installbl.h | 4 +-- rbutil/rbutilqt/installbootloader.cpp | 5 +-- rbutil/rbutilqt/irivertools/checksums.h | 39 +++++++++++++++++++++++ rbutil/rbutilqt/irivertools/irivertools.h | 15 --------- 4 files changed, 44 insertions(+), 19 deletions(-) create mode 100644 rbutil/rbutilqt/irivertools/checksums.h diff --git a/rbutil/rbutilqt/installbl.h b/rbutil/rbutilqt/installbl.h index 2376c51c4d..4f38242040 100644 --- a/rbutil/rbutilqt/installbl.h +++ b/rbutil/rbutilqt/installbl.h @@ -46,7 +46,7 @@ class InstallBl : public QDialog private: Ui::InstallBootloaderFrm ui; - ProgressLoggerGui* logger; + ProgressLoggerGui* logger; QUrl proxy; QSettings *devices; QSettings *userSettings; @@ -62,7 +62,7 @@ class InstallBl : public QDialog void browseFolder(void); void browseOF(void); void done(bool); - + }; diff --git a/rbutil/rbutilqt/installbootloader.cpp b/rbutil/rbutilqt/installbootloader.cpp index 7ee90c6ced..f6973259ff 100644 --- a/rbutil/rbutilqt/installbootloader.cpp +++ b/rbutil/rbutilqt/installbootloader.cpp @@ -18,6 +18,7 @@ ****************************************************************************/ #include "installbootloader.h" +#include "irivertools/checksums.h" BootloaderInstaller::BootloaderInstaller(QObject* parent): QObject(parent) { @@ -961,8 +962,8 @@ void BootloaderInstaller::iriverFinish() { // Patch firmware char md5sum_str[32]; - struct sumpairs *sums; - int origin; + struct sumpairs *sums = 0; + int origin = 0; /* get pointer to the correct bootloader.bin */ switch(series) { diff --git a/rbutil/rbutilqt/irivertools/checksums.h b/rbutil/rbutilqt/irivertools/checksums.h new file mode 100644 index 0000000000..aab58f6bca --- /dev/null +++ b/rbutil/rbutilqt/irivertools/checksums.h @@ -0,0 +1,39 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * Module: rbutil + * File: irivertools.h + * + * Copyright (C) 2007 Dominik Wenger + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef CHECKSUMS_H +#define CHECKSUMS_H + +/* precalculated checksums for H110/H115 */ +static struct sumpairs h100pairs[] = { +#include "h100sums.h" +}; + +/* precalculated checksums for H120/H140 */ +static struct sumpairs h120pairs[] = { +#include "h120sums.h" +}; + +/* precalculated checksums for H320/H340 */ +static struct sumpairs h300pairs[] = { +#include "h300sums.h" +}; + +#endif diff --git a/rbutil/rbutilqt/irivertools/irivertools.h b/rbutil/rbutilqt/irivertools/irivertools.h index dda84b1c75..8ded0807f8 100644 --- a/rbutil/rbutilqt/irivertools/irivertools.h +++ b/rbutil/rbutilqt/irivertools/irivertools.h @@ -34,21 +34,6 @@ struct sumpairs { char *patched; }; -/* precalculated checksums for H110/H115 */ -static struct sumpairs h100pairs[] = { -#include "h100sums.h" -}; - -/* precalculated checksums for H120/H140 */ -static struct sumpairs h120pairs[] = { -#include "h120sums.h" -}; - -/* precalculated checksums for H320/H340 */ -static struct sumpairs h300pairs[] = { -#include "h300sums.h" -}; - enum striptype {