Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-18 17:07:05 -0500
committerDan McGee <dan@archlinux.org>2011-09-18 17:11:39 -0500
commit86d9fcbfff6d806bcb6d0a19d73d09e1af4e1733 (patch)
tree7483800f1c85c9a6cedd8217b524719de6a8f222 /lib
parent69a3558b75948e4b1592a060a58f6c1d58b7d459 (diff)
Remove const specifier from changelog_read() void parameter
This shouldn't really be declared with const, and causes a compile error when -Wcast-qual is used. Remove the const specifier from the function specification and all implementations. Also fix one other trivial -Wcast-qual warning in _alpm_db_cmp(). Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/alpm.h2
-rw-r--r--lib/libalpm/be_local.c2
-rw-r--r--lib/libalpm/be_package.c2
-rw-r--r--lib/libalpm/db.c4
-rw-r--r--lib/libalpm/package.c4
-rw-r--r--lib/libalpm/package.h2
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index d180fcad..202c3cd3 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -899,7 +899,7 @@ void *alpm_pkg_changelog_open(alpm_pkg_t *pkg);
* error occurred.
*/
size_t alpm_pkg_changelog_read(void *ptr, size_t size,
- const alpm_pkg_t *pkg, const void *fp);
+ const alpm_pkg_t *pkg, void *fp);
int alpm_pkg_changelog_close(const alpm_pkg_t *pkg, void *fp);
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 80711df7..552f7dd9 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -190,7 +190,7 @@ static void *_cache_changelog_open(alpm_pkg_t *pkg)
* @return the number of characters read, or 0 if there is no more data
*/
static size_t _cache_changelog_read(void *ptr, size_t size,
- const alpm_pkg_t UNUSED *pkg, const void *fp)
+ const alpm_pkg_t UNUSED *pkg, void *fp)
{
return fread(ptr, 1, size, (FILE *)fp);
}
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 8b035cac..ff820b80 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -87,7 +87,7 @@ static void *_package_changelog_open(alpm_pkg_t *pkg)
* @return the number of characters read, or 0 if there is no more data
*/
static size_t _package_changelog_read(void *ptr, size_t size,
- const alpm_pkg_t UNUSED *pkg, const void *fp)
+ const alpm_pkg_t UNUSED *pkg, void *fp)
{
ssize_t sret = archive_read_data((struct archive *)fp, ptr, size);
/* Report error (negative values) */
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 4b23509a..765448df 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -381,8 +381,8 @@ const char *_alpm_db_path(alpm_db_t *db)
int _alpm_db_cmp(const void *d1, const void *d2)
{
- alpm_db_t *db1 = (alpm_db_t *)d1;
- alpm_db_t *db2 = (alpm_db_t *)d2;
+ const alpm_db_t *db1 = d1;
+ const alpm_db_t *db2 = d2;
return strcmp(db1->treename, db2->treename);
}
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index af893025..ecea4118 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -111,7 +111,7 @@ static void *_pkg_changelog_open(alpm_pkg_t UNUSED *pkg)
}
static size_t _pkg_changelog_read(void UNUSED *ptr, size_t UNUSED size,
- const alpm_pkg_t UNUSED *pkg, const UNUSED void *fp)
+ const alpm_pkg_t UNUSED *pkg, UNUSED void *fp)
{
return 0;
}
@@ -360,7 +360,7 @@ void SYMEXPORT *alpm_pkg_changelog_open(alpm_pkg_t *pkg)
/** Read data from an open changelog 'file stream'. */
size_t SYMEXPORT alpm_pkg_changelog_read(void *ptr, size_t size,
- const alpm_pkg_t *pkg, const void *fp)
+ const alpm_pkg_t *pkg, void *fp)
{
ASSERT(pkg != NULL, return 0);
pkg->handle->pm_errno = 0;
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index 41dd84b9..c19625c1 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -63,7 +63,7 @@ struct pkg_operations {
alpm_list_t *(*get_backup) (alpm_pkg_t *);
void *(*changelog_open) (alpm_pkg_t *);
- size_t (*changelog_read) (void *, size_t, const alpm_pkg_t *, const void *);
+ size_t (*changelog_read) (void *, size_t, const alpm_pkg_t *, void *);
int (*changelog_close) (const alpm_pkg_t *, void *);
int (*force_load) (alpm_pkg_t *);