Fix some extended compile warning.
authorMilan Broz <gmazyland@gmail.com>
Thu, 10 Jan 2013 16:26:19 +0000 (17:26 +0100)
committerMilan Broz <gmazyland@gmail.com>
Thu, 10 Jan 2013 16:26:19 +0000 (17:26 +0100)
lib/crypto_backend/crypto_cipher_kernel.c
lib/luks1/keyencryption.c
lib/utils_devpath.c
lib/utils_dm.h
src/cryptsetup.c
src/cryptsetup.h

index 3bda80a..2dd6595 100644 (file)
@@ -44,6 +44,9 @@ struct crypt_cipher {
        int opfd;
 };
 
+/* Shared with hash kernel backend */
+int crypt_kernel_socket_init(struct sockaddr_alg *sa, int *tfmfd, int *opfd);
+
 int crypt_kernel_socket_init(struct sockaddr_alg *sa, int *tfmfd, int *opfd)
 {
        *tfmfd = socket(AF_ALG, SOCK_SEQPACKET, 0);
index 7a3dc2f..de1b553 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <errno.h>
+#include "luks.h"
 #include "internal.h"
 
 static void _error_hint(struct crypt_device *ctx, const char *device,
index d1e8735..7e872ad 100644 (file)
 #include <sys/types.h>
 #include "utils_dm.h"
 
-/* These are DM helpers used only by this file */
-int dm_is_dm_device(int major, int minor);
-int dm_is_dm_kernel_name(const char *name);
-char *dm_device_path(const char *prefix, int major, int minor);
-
 char *crypt_lookup_dev(const char *dev_id);
 int crypt_sysfs_get_rotational(int major, int minor, int *rotational);
 
index ae4836c..63e972b 100644 (file)
@@ -100,4 +100,9 @@ int dm_resume_and_reinstate_key(struct crypt_device *cd, const char *name,
 
 const char *dm_get_dir(void);
 
+/* These are DM helpers used only by utils_devpath file */
+int dm_is_dm_device(int major, int minor);
+int dm_is_dm_kernel_name(const char *name);
+char *dm_device_path(const char *prefix, int major, int minor);
+
 #endif /* _UTILS_DM_H */
index bb429f1..86337dc 100644 (file)
@@ -475,7 +475,7 @@ static int action_benchmark(void)
                { "twofish", "xts", 64, 16 },
                {  NULL, NULL, 0, 0 }
        };
-       static char *bkdfs[] = {
+       static const char *bkdfs[] = {
                "sha1", "sha256", "sha512", "ripemd160", "whirlpool", NULL
        };
        char cipher[MAX_CIPHER_LEN], cipher_mode[MAX_CIPHER_LEN];
index c9a40b8..9d4e78a 100644 (file)
@@ -69,6 +69,7 @@ void quiet_log(int level, const char *msg, void *usrptr);
 int yesDialog(const char *msg, void *usrptr __attribute__((unused)));
 void show_status(int errcode);
 const char *uuid_or_device(const char *spec);
+__attribute__ ((noreturn)) \
 void usage(poptContext popt_context, int exitcode, const char *error, const char *more);
 void dbg_version_and_cmd(int argc, const char **argv);
 int translate_errno(int r);