Fix some extended compile warning.

This commit is contained in:
Milan Broz
2013-01-10 17:26:19 +01:00
parent 310bf08568
commit fe4175b551
6 changed files with 11 additions and 6 deletions

View 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);

View 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,

View File

@@ -32,11 +32,6 @@
#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);

View 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 */

View 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];

View 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);