aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2005-01-03 03:43:11 +0000
committerJason Woodward2005-01-03 03:43:11 +0000
commit9e0cd138a51d13f0b1ac86191eb2ba999795ecf2 (patch)
treedacfbb5c461ad0c26f504ba2d7616b408d4fd5f2
parent0adb9c8cf235250c8d4d4306878fd6c900ff456a (diff)
downloadslapt-get-9e0cd138a51d13f0b1ac86191eb2ba999795ecf2.tar.gz
added cast to fix strpbrk() void pointer arith warning with gcc-3.4
-rw-r--r--ChangeLog3
-rw-r--r--src/package.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 1351960..b135d54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
-0.9.9f Jan 01, 2005
+0.9.9f Jan 02, 2005
+ * added cast to fix strpbrk() void pointer arith warning with gcc-3.4
* updated FAQ
* added alsa.* to default exclude
* produce warning if slack-require information is too long
diff --git a/src/package.c b/src/package.c
index c72b485..1bd3770 100644
--- a/src/package.c
+++ b/src/package.c
@@ -296,7 +296,7 @@ struct pkg_list *parse_packages_txt(FILE *pkg_list_fh){
((bytes_read = getline(&getline_buffer,&getline_len,pkg_list_fh)) != EOF) &&
((char_pointer = strstr(getline_buffer,"PACKAGE CONFLICTS")) != NULL)
){
- char *conflicts = strpbrk(char_pointer,":") + 3;
+ char *conflicts = (char *)strpbrk(char_pointer,":") + 3;
if( strlen(conflicts) > CONFLICTS_LEN ){
fprintf( stderr, _("conflict too long [%s:%d]\n"),
conflicts,
@@ -319,7 +319,7 @@ struct pkg_list *parse_packages_txt(FILE *pkg_list_fh){
((bytes_read = getline(&getline_buffer,&getline_len,pkg_list_fh)) != EOF) &&
((char_pointer = strstr(getline_buffer,"PACKAGE SUGGESTS")) != NULL)
){
- char *suggests = strpbrk(char_pointer,":") + 3;
+ char *suggests = (char *)strpbrk(char_pointer,":") + 3;
if( strlen(suggests) > SUGGESTS_LEN ){
fprintf( stderr, _("suggests too long [%s:%d]\n"),
suggests,
@@ -344,7 +344,7 @@ struct pkg_list *parse_packages_txt(FILE *pkg_list_fh){
){
char *md5sum;
getline_buffer[bytes_read - 1] = '\0';
- md5sum = strpbrk(getline_buffer,":") + 3;
+ md5sum = (char *)strpbrk(getline_buffer,":") + 3;
/* don't overflow the buffer */
if( strlen(md5sum) > MD5_STR_LEN ){
fprintf( stderr, _("md5 sum too long [%s %s:%d]\n"),