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>
This commit is contained in:
parent
69a3558b75
commit
86d9fcbfff
6 changed files with 8 additions and 8 deletions
|
@ -899,7 +899,7 @@ void *alpm_pkg_changelog_open(alpm_pkg_t *pkg);
|
||||||
* error occurred.
|
* error occurred.
|
||||||
*/
|
*/
|
||||||
size_t alpm_pkg_changelog_read(void *ptr, size_t size,
|
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);
|
int alpm_pkg_changelog_close(const alpm_pkg_t *pkg, void *fp);
|
||||||
|
|
||||||
|
|
|
@ -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
|
* @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,
|
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);
|
return fread(ptr, 1, size, (FILE *)fp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
* @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,
|
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);
|
ssize_t sret = archive_read_data((struct archive *)fp, ptr, size);
|
||||||
/* Report error (negative values) */
|
/* Report error (negative values) */
|
||||||
|
|
|
@ -381,8 +381,8 @@ const char *_alpm_db_path(alpm_db_t *db)
|
||||||
|
|
||||||
int _alpm_db_cmp(const void *d1, const void *d2)
|
int _alpm_db_cmp(const void *d1, const void *d2)
|
||||||
{
|
{
|
||||||
alpm_db_t *db1 = (alpm_db_t *)d1;
|
const alpm_db_t *db1 = d1;
|
||||||
alpm_db_t *db2 = (alpm_db_t *)d2;
|
const alpm_db_t *db2 = d2;
|
||||||
return strcmp(db1->treename, db2->treename);
|
return strcmp(db1->treename, db2->treename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ void SYMEXPORT *alpm_pkg_changelog_open(alpm_pkg_t *pkg)
|
||||||
|
|
||||||
/** Read data from an open changelog 'file stream'. */
|
/** Read data from an open changelog 'file stream'. */
|
||||||
size_t SYMEXPORT alpm_pkg_changelog_read(void *ptr, size_t size,
|
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);
|
ASSERT(pkg != NULL, return 0);
|
||||||
pkg->handle->pm_errno = 0;
|
pkg->handle->pm_errno = 0;
|
||||||
|
|
|
@ -63,7 +63,7 @@ struct pkg_operations {
|
||||||
alpm_list_t *(*get_backup) (alpm_pkg_t *);
|
alpm_list_t *(*get_backup) (alpm_pkg_t *);
|
||||||
|
|
||||||
void *(*changelog_open) (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 (*changelog_close) (const alpm_pkg_t *, void *);
|
||||||
|
|
||||||
int (*force_load) (alpm_pkg_t *);
|
int (*force_load) (alpm_pkg_t *);
|
||||||
|
|
Loading…
Add table
Reference in a new issue