1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +03:00

cleanup: gcc warnings

This commit is contained in:
Zdenek Kabelac 2014-11-08 15:33:17 +01:00
parent e5d3f81285
commit f12e3da639
4 changed files with 5 additions and 4 deletions

View File

@ -1035,7 +1035,7 @@ static void _dump_pairs(struct buffer *buf, struct dm_hash_table *ht, const char
*val = dm_hash_get_data(ht, n);
buffer_append(buf, " ");
if (int_key)
(void) dm_asprintf(&append, "%d = \"%s\"", *(int*)key, val);
(void) dm_asprintf(&append, "%d = \"%s\"", *(const int*)key, val);
else
(void) dm_asprintf(&append, "%s = \"%s\"", key, val);
if (append)

View File

@ -3176,7 +3176,7 @@ int dm_tree_node_add_raid_target_with_params(struct dm_tree_node *node,
uint64_t size,
struct dm_tree_node_raid_params *p)
{
int i;
unsigned i;
struct load_segment *seg = NULL;
for (i = 0; i < DM_ARRAY_SIZE(_dm_segtypes) && !seg; ++i)

View File

@ -1986,6 +1986,7 @@ static void _liblvm_cleanup(void)
}
}
PyMODINIT_FUNC initlvm(void);
PyMODINIT_FUNC initlvm(void)
{
PyObject *m;
@ -2020,7 +2021,7 @@ PyMODINIT_FUNC initlvm(void)
LVM_THIN_DISCARDS_PASSDOWN) < 0)
return;
if ((_LibLVMError = PyErr_NewException("lvm.LibLVMError", NULL, NULL))) {
if ((_LibLVMError = PyErr_NewException((char*)"lvm.LibLVMError", NULL, NULL))) {
/* Each call to PyModule_AddObject decrefs it; compensate: */
Py_INCREF(_LibLVMError);
Py_INCREF(_LibLVMError);

View File

@ -1500,8 +1500,8 @@ int lvm_return_code(int ret)
int lvm_split(char *str, int *argc, char **argv, int max)
{
char *b = str, *e;
*argc = 0;
char quote = 0;
*argc = 0;
while (*b) {
while (*b && isspace(*b))