summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/binwriter.cpp8
-rw-r--r--lib/cdabstract.cpp3
-rw-r--r--lib/dvdabstract.cpp6
-rw-r--r--lib/luacd.cpp21
4 files changed, 21 insertions, 17 deletions
diff --git a/lib/binwriter.cpp b/lib/binwriter.cpp
index 5896315..dd7c712 100644
--- a/lib/binwriter.cpp
+++ b/lib/binwriter.cpp
@@ -17,18 +17,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: binwriter.cpp,v 1.1 2005-12-02 11:28:27 pixel Exp $ */
+/* $Id: binwriter.cpp,v 1.2 2006-02-02 14:09:49 pixel Exp $ */
#include <binwriter.h>
#include <binary.h>
void BinWriter::merge(void) {
- Section * iter, * sub_iter;
+ Section * iter;
std::vector<Section *> merged;
std::vector<Section *> to_merge;
std::vector<Section *>::iterator i;
- bool is_in, did_merge, pure_bss, is_before_us;
- Uint32 base, real_size, whole_size, end_address, sub_size;
+ bool is_in, pure_bss;
+ Uint32 base, real_size, whole_size, end_address;
for (iter = Section::GetFirst(); iter; iter = iter->GetNext()) {
is_in = false;
diff --git a/lib/cdabstract.cpp b/lib/cdabstract.cpp
index 44663f6..060edee 100644
--- a/lib/cdabstract.cpp
+++ b/lib/cdabstract.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: cdabstract.cpp,v 1.9 2004-11-27 21:47:56 pixel Exp $ */
+/* $Id: cdabstract.cpp,v 1.10 2006-02-02 14:09:49 pixel Exp $ */
#include "cdabstract.h"
#include "Input.h"
@@ -174,7 +174,6 @@ bool cdabstract::subprobe(String & probed) {
#ifdef _WIN32
int iDA, iDT, iDL;
- char letter[4];
HANDLE h;
if (GetDriveType(probed.to_charp()) == DRIVE_CDROM) {
diff --git a/lib/dvdabstract.cpp b/lib/dvdabstract.cpp
index 9e2370f..12d33c4 100644
--- a/lib/dvdabstract.cpp
+++ b/lib/dvdabstract.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: dvdabstract.cpp,v 1.3 2005-11-13 13:43:22 pixel Exp $ */
+/* $Id: dvdabstract.cpp,v 1.4 2006-02-02 14:09:49 pixel Exp $ */
#include "dvdabstract.h"
@@ -34,7 +34,11 @@ off_t dvdabstract::seek(off_t offset, int wheel) throw (GeneralException) {
break;
case SEEK_END:
throw IOGeneral("Can't seek from the end of the dvdabstract...");
+ default:
+ throw IOGeneral("Invalid seek wheel.");
}
+
+ return v;
}
off_t dvdabstract::tell() const {
diff --git a/lib/luacd.cpp b/lib/luacd.cpp
index 56ffe73..b1838fb 100644
--- a/lib/luacd.cpp
+++ b/lib/luacd.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: luacd.cpp,v 1.20 2005-11-13 13:41:20 pixel Exp $ */
+/* $Id: luacd.cpp,v 1.21 2006-02-02 14:09:49 pixel Exp $ */
#include "luacd.h"
@@ -40,7 +40,7 @@ enum cdutils_methods_t {
CDUTILS_READdata,
CDUTILS_READFILE,
CDUTILS_WRITESECTOR,
- CDUTILS_WRITEdata,
+ CDUTILS_WRITEDATA,
CDUTILS_WRITEFILE,
CDUTILS_GETISOINFOS,
CDUTILS_GETPTINFOS,
@@ -72,7 +72,7 @@ struct lua_functypes_t cdutils_methods[] = {
{ CDUTILS_READdata, "readdata", 1, 3, {LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
{ CDUTILS_READFILE, "readfile", 2, 4, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
{ CDUTILS_WRITESECTOR, "writesector", 1, 3, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER} },
- { CDUTILS_WRITEdata, "writedata", 2, 4, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
+ { CDUTILS_WRITEDATA, "writedata", 2, 4, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
{ CDUTILS_WRITEFILE, "writefile", 1, 4, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} },
{ CDUTILS_GETISOINFOS, "getisoinfos", 0, 0, 0 },
{ CDUTILS_GETPTINFOS, "getptinfos", 0, 0, 0 },
@@ -107,7 +107,7 @@ class sLua_cdutils : public Base {
DECLARE_METHOD(cdutils, CDUTILS_READdata);
DECLARE_METHOD(cdutils, CDUTILS_READFILE);
DECLARE_METHOD(cdutils, CDUTILS_WRITESECTOR);
- DECLARE_METHOD(cdutils, CDUTILS_WRITEdata);
+ DECLARE_METHOD(cdutils, CDUTILS_WRITEDATA);
DECLARE_METHOD(cdutils, CDUTILS_WRITEFILE);
DECLARE_METHOD(cdutils, CDUTILS_GETISOINFOS);
DECLARE_METHOD(cdutils, CDUTILS_GETPTINFOS);
@@ -143,7 +143,7 @@ void Luacdutils::pushmembers(Lua * L) {
PUSH_METHOD(cdutils, CDUTILS_READdata);
PUSH_METHOD(cdutils, CDUTILS_READFILE);
PUSH_METHOD(cdutils, CDUTILS_WRITESECTOR);
- PUSH_METHOD(cdutils, CDUTILS_WRITEdata);
+ PUSH_METHOD(cdutils, CDUTILS_WRITEDATA);
PUSH_METHOD(cdutils, CDUTILS_WRITEFILE);
PUSH_METHOD(cdutils, CDUTILS_GETISOINFOS);
PUSH_METHOD(cdutils, CDUTILS_GETPTINFOS);
@@ -304,9 +304,9 @@ int sLua_cdutils::cdutils_proceed(Lua * L, int n, cdutils * cd, int caller) {
sdata[i] = L->tonumber();
L->pop();
}
- cd->write_sector(data, mode, sect);
+ cd->write_sector(sdata, mode, sect);
break;
- case CDUTILS_WRITEdata:
+ case CDUTILS_WRITEDATA:
size = L->tonumber(3);
if (n >= 3)
sect = L->tonumber(4);
@@ -317,7 +317,7 @@ int sLua_cdutils::cdutils_proceed(Lua * L, int n, cdutils * cd, int caller) {
for (i = 0; i < size; i++) {
L->push((lua_Number) i);
L->gettable(2);
- sdata[i] = L->tonumber();
+ data[i] = L->tonumber();
L->pop();
}
cd->write_data(data, size, mode, sect);
@@ -879,7 +879,7 @@ void LuaPVD::pushstatics(Lua * L) throw (GeneralException) {
}
int sLua_PVD::PVD_proceed(Lua * L, int n, PVD * pvd, int caller) {
- int r = 0, key_i = 0, value_i;
+ int r = 0, key_i = 0;
String key_s, value_s;
cddate * value_date;
bool invalid = false, keyisstring;
@@ -1311,13 +1311,14 @@ int sLua_DirTree::DirTree_proceed(Lua * L, int n, DirTree * dir, int caller) {
}
int sLua_DirTree::DirTree_proceed_statics(Lua * L, int n, int caller) {
- int r;
+ int r = 0;
DirTree * father;
bool dir = true;
switch (caller) {
case DIRTREE_NEWDIRTREE:
father = (DirTree *) LuaObject::getme(L, 1);
+ r = 1;
if (n == 2)
dir = L->toboolean(2);
{