summaryrefslogtreecommitdiff
path: root/storage/archive
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2023-01-10 10:45:03 +1100
committerAndrew Hutchings <andrew@linuxjedi.co.uk>2023-01-10 17:10:43 +0000
commit56948ee54c9d113f07f725ebdc560d1919fc6676 (patch)
treeec9661fb5f822176475aca5590a194615c423f13 /storage/archive
parentd7f447915c96681c85abf00d22de589a5332a6da (diff)
downloadmariadb-git-56948ee54c9d113f07f725ebdc560d1919fc6676.tar.gz
clang15 warnings - unused vars and old prototypes
clang15 finally errors on old prototype definations. Its also a lot fussier about variables that aren't used as is the case a number of time with loop counters that aren't examined. RocksDB was complaining that its get_range function was declared without the array length in ha_rocksdb.h. While a constant is used rather than trying to import the Rdb_key_def::INDEX_NUMBER_SIZE header (was causing a lot of errors on the defination of other orders). If the constant does change can be assured that the same compile warnings will tell us of the error. The ha_rocksdb::index_read_map_impl DBUG_EXECUTE_IF was similar to the existing endless functions used in replication tests. Its rather moot point as the rocksdb.force_shutdown test that uses myrocks_busy_loop_on_row_read is currently disabled.
Diffstat (limited to 'storage/archive')
-rw-r--r--storage/archive/azio.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/storage/archive/azio.c b/storage/archive/azio.c
index 0f66b999c94..916abc90d7b 100644
--- a/storage/archive/azio.c
+++ b/storage/archive/azio.c
@@ -249,8 +249,7 @@ int azdopen(azio_stream *s, File fd, int Flags)
for end of file.
IN assertion: the stream s has been sucessfully opened for reading.
*/
-int get_byte(s)
- azio_stream *s;
+int get_byte(azio_stream *s)
{
if (s->z_eof) return EOF;
if (s->stream.avail_in == 0)
@@ -427,8 +426,7 @@ void read_header(azio_stream *s, unsigned char *buffer)
* Cleanup then free the given azio_stream. Return a zlib error code.
Try freeing in the reverse order of allocations.
*/
-int destroy (s)
- azio_stream *s;
+int destroy (azio_stream *s)
{
int err = Z_OK;
@@ -679,9 +677,7 @@ int do_flush (azio_stream *s, int flush)
return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
}
-int ZEXPORT azflush (s, flush)
- azio_stream *s;
- int flush;
+int ZEXPORT azflush (azio_stream *s, int flush)
{
int err;
@@ -708,8 +704,7 @@ int ZEXPORT azflush (s, flush)
/* ===========================================================================
Rewinds input file.
*/
-int azrewind (s)
- azio_stream *s;
+int azrewind (azio_stream *s)
{
if (s == NULL || s->mode != 'r') return -1;
@@ -733,10 +728,7 @@ int azrewind (s)
SEEK_END is not implemented, returns error.
In this version of the library, azseek can be extremely slow.
*/
-my_off_t azseek (s, offset, whence)
- azio_stream *s;
- my_off_t offset;
- int whence;
+my_off_t azseek (azio_stream *s, my_off_t offset, int whence)
{
if (s == NULL || whence == SEEK_END ||
@@ -812,8 +804,7 @@ my_off_t azseek (s, offset, whence)
given compressed file. This position represents a number of bytes in the
uncompressed data stream.
*/
-my_off_t ZEXPORT aztell (file)
- azio_stream *file;
+my_off_t ZEXPORT aztell (azio_stream *file)
{
return azseek(file, 0L, SEEK_CUR);
}