2007-06-05 04:29:16 +02:00
|
|
|
fix some gcc warnings
|
|
|
|
|
2007-10-16 17:49:45 +02:00
|
|
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
|
|
|
2007-06-05 04:29:16 +02:00
|
|
|
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
|
2007-10-16 17:49:45 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
lib/libdevmapper.c | 2 +-
|
|
|
|
lib/setup.c | 2 --
|
|
|
|
lib/utils.c | 4 ++--
|
|
|
|
luks/keymanage.c | 2 +-
|
|
|
|
4 files changed, 4 insertions(+), 6 deletions(-)
|
2007-06-05 04:29:16 +02:00
|
|
|
|
2007-10-16 17:49:45 +02:00
|
|
|
diff --git a/lib/libdevmapper.c b/lib/libdevmapper.c
|
|
|
|
index 888b689..676064a 100644
|
|
|
|
--- a/lib/libdevmapper.c
|
|
|
|
+++ b/lib/libdevmapper.c
|
|
|
|
@@ -258,7 +258,7 @@ static int dm_query_device(int details, struct crypt_options *options,
|
2007-06-05 04:29:16 +02:00
|
|
|
options->skip = 0;
|
|
|
|
options->size = length;
|
|
|
|
if (details) {
|
|
|
|
- char *cipher, *key_, *device, *tmp;
|
|
|
|
+ char *cipher, *key_, *device;
|
|
|
|
uint64_t val64;
|
|
|
|
|
|
|
|
set_error("Invalid dm table");
|
2007-10-16 17:49:45 +02:00
|
|
|
diff --git a/lib/setup.c b/lib/setup.c
|
|
|
|
index 0429b33..5b85bd6 100644
|
|
|
|
--- a/lib/setup.c
|
|
|
|
+++ b/lib/setup.c
|
|
|
|
@@ -56,8 +56,6 @@ static int setup_enter(struct setup_backend *backend)
|
2007-06-05 04:29:16 +02:00
|
|
|
|
|
|
|
static int setup_leave(struct setup_backend *backend)
|
|
|
|
{
|
|
|
|
- const char *error;
|
|
|
|
-
|
|
|
|
if (backend)
|
|
|
|
backend->exit();
|
|
|
|
|
2007-10-16 17:49:45 +02:00
|
|
|
diff --git a/lib/utils.c b/lib/utils.c
|
|
|
|
index 718d418..fbf34bc 100644
|
|
|
|
--- a/lib/utils.c
|
|
|
|
+++ b/lib/utils.c
|
|
|
|
@@ -174,7 +174,7 @@ ssize_t write_blockwise(int fd, const void *orig_buf, size_t count)
|
2007-06-05 04:29:16 +02:00
|
|
|
{
|
|
|
|
char *padbuf; char *padbuf_base;
|
|
|
|
char *buf = (char *)orig_buf;
|
|
|
|
- int r;
|
|
|
|
+ int r = 0;
|
|
|
|
int hangover; int solid; int bsize;
|
|
|
|
|
|
|
|
if ((bsize = sector_size(fd)) < 0)
|
2007-10-16 17:49:45 +02:00
|
|
|
@@ -214,7 +214,7 @@ ssize_t write_blockwise(int fd, const void *orig_buf, size_t count)
|
2007-06-05 04:29:16 +02:00
|
|
|
ssize_t read_blockwise(int fd, void *orig_buf, size_t count) {
|
|
|
|
char *padbuf; char *padbuf_base;
|
|
|
|
char *buf = (char *)orig_buf;
|
|
|
|
- int r;
|
|
|
|
+ int r = 0;
|
|
|
|
int step;
|
|
|
|
int bsize;
|
|
|
|
|
2007-10-16 17:49:45 +02:00
|
|
|
diff --git a/luks/keymanage.c b/luks/keymanage.c
|
|
|
|
index 77d8414..8b07458 100644
|
|
|
|
--- a/luks/keymanage.c
|
|
|
|
+++ b/luks/keymanage.c
|
|
|
|
@@ -420,7 +420,7 @@ static int wipe(const char *device, unsigned int from, unsigned int to)
|
2007-06-05 04:29:16 +02:00
|
|
|
int LUKS_del_key(const char *device, unsigned int keyIndex)
|
|
|
|
{
|
|
|
|
struct luks_phdr hdr;
|
|
|
|
- unsigned int i, startOffset, endOffset, stripesLen;
|
|
|
|
+ unsigned int startOffset, endOffset, stripesLen;
|
|
|
|
int r;
|
|
|
|
|
|
|
|
r = LUKS_read_phdr(device, &hdr);
|