Remove some more causes of warnings.
This commit is contained in:
+3
-3
@@ -41,9 +41,9 @@ static void help(void) {
|
||||
}
|
||||
|
||||
static int init(int argc, char **argv) {
|
||||
const char *str;
|
||||
int value;
|
||||
double dvalue;
|
||||
// const char *str;
|
||||
// int value;
|
||||
// double dvalue;
|
||||
ao_initialize();
|
||||
int driver = ao_default_driver_id();
|
||||
ao_option *ao_opts = NULL;
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ static int min_int(int a, int b) { return (a < b) ? a : b; }
|
||||
static void write_callback(struct SoundIoOutStream *outstream, int frame_count_min,
|
||||
int frame_count_max) {
|
||||
struct SoundIoChannelArea *areas;
|
||||
int frame_count;
|
||||
// int frame_count;
|
||||
int err;
|
||||
|
||||
char *read_ptr = soundio_ring_buffer_read_ptr(ring_buffer);
|
||||
@@ -168,7 +168,7 @@ static void start(int sample_rate, int sample_format) {
|
||||
}
|
||||
|
||||
static void play(short buf[], int samples) {
|
||||
int err;
|
||||
// int err;
|
||||
int free_bytes = soundio_ring_buffer_free_count(ring_buffer);
|
||||
int written_bytes = 0;
|
||||
int write_bytes = 0;
|
||||
|
||||
+2
-2
@@ -151,14 +151,14 @@ char *metadata_write_image_file(const char *buf, int len) {
|
||||
#ifdef HAVE_LIBMBEDTLS
|
||||
mbedtls_md5_context tctx;
|
||||
mbedtls_md5_starts(&tctx);
|
||||
mbedtls_md5_update(&tctx, buf, len);
|
||||
mbedtls_md5_update(&tctx, (const unsigned char *)buf, len);
|
||||
mbedtls_md5_finish(&tctx, img_md5);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBPOLARSSL
|
||||
md5_context tctx;
|
||||
md5_starts(&tctx);
|
||||
md5_update(&tctx, buf, len);
|
||||
md5_update(&tctx, (const unsigned char *)buf, len);
|
||||
md5_finish(&tctx, img_md5);
|
||||
#endif
|
||||
|
||||
|
||||
+3
-2
@@ -1600,7 +1600,7 @@ struct mdns_service *mdnsd_register_svc(struct mdnsd *svr, const char *instance_
|
||||
const char *txt[]) {
|
||||
struct rr_entry *txt_e = NULL, *srv_e = NULL, *ptr_e = NULL, *bptr_e = NULL;
|
||||
uint8_t *target;
|
||||
uint8_t *inst_nlabel, *type_nlabel, *nlabel;
|
||||
uint8_t *inst_nlabel, *type_nlabel, *nlabel = NULL;
|
||||
struct mdns_service *service = malloc(sizeof(struct mdns_service));
|
||||
if (service)
|
||||
memset(service, 0, sizeof(struct mdns_service));
|
||||
@@ -1655,7 +1655,8 @@ struct mdns_service *mdnsd_register_svc(struct mdnsd *svr, const char *instance_
|
||||
pthread_mutex_unlock(&svr->data_lock);
|
||||
|
||||
// don't free type_nlabel - it's with the PTR record
|
||||
free(nlabel);
|
||||
if (nlabel)
|
||||
free(nlabel);
|
||||
free(inst_nlabel);
|
||||
|
||||
// notify server
|
||||
|
||||
Reference in New Issue
Block a user