diff options
author | joerg <joerg> | 2006-03-23 00:36:37 +0000 |
---|---|---|
committer | joerg <joerg> | 2006-03-23 00:36:37 +0000 |
commit | 7336657b8a11537dc1378bfa1b5a17d2d0af34d9 (patch) | |
tree | 352ad07476510edd216053109863b1ae55b7f794 /net/openag/patches | |
parent | 42347b8d3b76da5da08c3ae0fd25d30e0edf1908 (diff) | |
download | pkgsrc-7336657b8a11537dc1378bfa1b5a17d2d0af34d9.tar.gz |
lvalue cast == evil, lvalue cast in C++ == broken. Attempt to fix them.
Diffstat (limited to 'net/openag/patches')
-rw-r--r-- | net/openag/patches/patch-ac | 17 | ||||
-rw-r--r-- | net/openag/patches/patch-ad | 45 |
2 files changed, 62 insertions, 0 deletions
diff --git a/net/openag/patches/patch-ac b/net/openag/patches/patch-ac new file mode 100644 index 00000000000..2513ea922fa --- /dev/null +++ b/net/openag/patches/patch-ac @@ -0,0 +1,17 @@ +$NetBSD: patch-ac,v 1.1 2006/03/23 00:36:37 joerg Exp $ + +--- libOpenAG/AGMessage.cpp.orig 2006-03-23 00:19:02.000000000 +0000 ++++ libOpenAG/AGMessage.cpp +@@ -282,9 +282,9 @@ unsigned short AGMessage::read_short() + + unsigned char AGMessage::read_byte() + { +- unsigned char* temp = new unsigned char[1]; +- read_string((char*)temp, (unsigned short)1); +- unsigned char temp2 = *(temp); ++ char* temp = new char[1]; ++ read_string(temp, (unsigned short)1); ++ unsigned char temp2 = (unsigned char)*(temp); + #if AGDEBUGLEVEL > 5 + printf("read byte: %i\n", temp2); + #endif diff --git a/net/openag/patches/patch-ad b/net/openag/patches/patch-ad new file mode 100644 index 00000000000..43154d58f91 --- /dev/null +++ b/net/openag/patches/patch-ad @@ -0,0 +1,45 @@ +$NetBSD: patch-ad,v 1.1 2006/03/23 00:36:37 joerg Exp $ + +--- mp3info/id3v2.cpp.orig 2006-03-23 00:26:32.000000000 +0000 ++++ mp3info/id3v2.cpp +@@ -112,11 +112,11 @@ size_t my_fread(void *input_buffer, size + if( available_data_size < number_of_items*size_of_item ) + { + memcpy(input_buffer , file_handler->big_u.mem_data.current_point , available_data_size); +- (char *)(file_handler->big_u.mem_data.current_point) += available_data_size; ++ file_handler->big_u.mem_data.current_point = (char *)file_handler->big_u.mem_data.current_point + available_data_size; + return available_data_size/size_of_item; + } + memcpy(input_buffer , file_handler->big_u.mem_data.current_point , number_of_items*size_of_item); +- (char *)(file_handler->big_u.mem_data.current_point) += number_of_items*size_of_item; ++ file_handler->big_u.mem_data.current_point = (char *)file_handler->big_u.mem_data.current_point + number_of_items*size_of_item; + return number_of_items*size_of_item; + // break; /* NOT needed */ + } +@@ -155,7 +155,7 @@ int my_getc( MY_FILE *file_handler ) + return EOF; + } + char_to_return = *((char *)(file_handler->big_u.mem_data.current_point)); +- ((char *)(file_handler->big_u.mem_data.current_point))++; ++ file_handler->big_u.mem_data.current_point = (char *)file_handler->big_u.mem_data.current_point + 1; + return char_to_return; + // break; /* NOT needed */ + } +@@ -190,7 +190,7 @@ int my_fgetc( MY_FILE *file_handle ) + return EOF; + } + char_to_return = *((char *)(file_handle->big_u.mem_data.current_point)); +- ((char *)(file_handle->big_u.mem_data.current_point))++; ++ file_handle->big_u.mem_data.current_point = (char *)file_handle->big_u.mem_data.current_point + 1; + return char_to_return; + // break; /* NOT needed */ + } +@@ -236,7 +236,7 @@ long my_fseek( MY_FILE *file_handler , l + // errno = EINVAL; + return -1; + } +- (char *)(file_handler->big_u.mem_data.current_point) += offset; ++ file_handler->big_u.mem_data.current_point = (char *)file_handler->big_u.mem_data.current_point + offset; + break; + } + case SEEK_END : |