Changeset 5651:b0e163908378 in roaraudio
- Timestamp:
- 09/12/12 16:22:42 (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r5649 r5651 16 16 size growth (Closes: #284) 17 17 * Added RAT test 'buffer_set_len'. 18 * Added compiler checks for printf() like format strings. 18 19 19 20 v. 1.0beta5 - Mon Aug 20 2012 23:52 CEST -
include/libroar/debug.h
r5381 r5651 74 74 struct roar_vio_calls * roar_debug_get_stderr(void); 75 75 76 void roar_debug_msg_simple(const char *format, ...) ;76 void roar_debug_msg_simple(const char *format, ...) _LIBROAR_ATTR_PRINTF(1, 2); 77 77 78 void roar_debug_msg(int type, unsigned long int line, const char * file, const char * prefix, const char * format, ...) ;78 void roar_debug_msg(int type, unsigned long int line, const char * file, const char * prefix, const char * format, ...) _LIBROAR_ATTR_PRINTF(5, 6); 79 79 80 80 #endif -
include/libroar/vio_string.h
r5381 r5651 46 46 char * roar_vio_fgets (struct roar_vio_calls * vio, char * s, size_t size) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL; 47 47 48 int roar_vio_printf (struct roar_vio_calls * vio, const char *format, ...) _LIBROAR_ATTR_NONNULL(1, 2) ;48 int roar_vio_printf (struct roar_vio_calls * vio, const char *format, ...) _LIBROAR_ATTR_NONNULL(1, 2) _LIBROAR_ATTR_PRINTF(2, 3); 49 49 50 50 #endif -
include/roaraudio/compilerhacks.h
r5381 r5651 38 38 #define _LIBROAR_ATTR_PURE __attribute__ ((pure)) 39 39 #define _LIBROAR_ATTR_USE_RESULT __attribute__ ((warn_unused_result)) 40 #define _LIBROAR_ATTR_PRINTF(str,args) __attribute__ ((format (printf, str, args))) 40 41 41 42 // gcc does not only add a warning on NULL argument for the following … … 67 68 #define _LIBROAR_ATTR_USE_RESULT 68 69 #endif 70 #ifndef _LIBROAR_ATTR_PRINTF 71 #define _LIBROAR_ATTR_PRINTF(str,args) 72 #endif 69 73 70 74 #ifndef _LIBROAR_IGNORE_RET -
libroar/auth.c
r5381 r5651 169 169 if ( (ret = roar_req2(con, &mes, &data, &error_frame)) == -1 ) { 170 170 authmes->type = -1; 171 ROAR_DBG("roar_auth_ask_server(con=%p, authmes=%p) = -1 // next: -1", con, authmes , authmes->type);171 ROAR_DBG("roar_auth_ask_server(con=%p, authmes=%p) = -1 // next: -1", con, authmes); 172 172 return -1; 173 173 } -
libroar/buffer.c
r5647 r5651 191 191 192 192 if ( cur->refc == 0 ) { 193 ROAR_WARN("roar_buffer_unref(buf=%p): Ref counter for buffer at %p is wrong. assuming one.", cur );193 ROAR_WARN("roar_buffer_unref(buf=%p): Ref counter for buffer at %p is wrong. assuming one.", cur, cur); 194 194 cur->refc = 1; 195 195 roar_panic(ROAR_FATAL_ERROR_MEMORY_CORRUPTION, NULL); -
libroar/passwordapi.c
r5381 r5651 44 44 45 45 if ( prompt == NULL ) { 46 ROAR_WARN("roar_passwd_simple_ask_pw(pw=%p, prompt=NULL, cachetoken='%s'): No prompt given. This may be a bug in application." );46 ROAR_WARN("roar_passwd_simple_ask_pw(pw=%p, prompt=NULL, cachetoken='%s'): No prompt given. This may be a bug in application.", pw, cachetoken); 47 47 prompt = "Please enter Password"; 48 48 } -
libroar/roardl.c
r5584 r5651 521 521 (void)type; 522 522 523 ROAR_DBG("roar_dl_getsym(lhandle=%p, sym='%s', type=%i): errno=%s(%i), dlerror()='%s'", lhandle, sym, type, ret, strerror(errno), errno, dlerror());523 ROAR_DBG("roar_dl_getsym(lhandle=%p, sym='%s', type=%i): ret=%p, errno=%s(%i), dlerror()='%s'", lhandle, sym, type, ret, strerror(errno), errno, dlerror()); 524 524 ROAR_DBG("roar_dl_getsym(lhandle=%p, sym='%s', type=%i) = %p", lhandle, sym, type, ret); 525 525 -
libroar/vio_dstr.c
r5408 r5651 391 391 break; 392 392 default: 393 ROAR_DBG("roar_vio_open_default(calls=%p, def=%p, opts='%s') = -1 // error=NOTSUP", calls, def, opts , (int)def->type);393 ROAR_DBG("roar_vio_open_default(calls=%p, def=%p, opts='%s') = -1 // error=NOTSUP", calls, def, opts); 394 394 roar_err_set(ROAR_ERROR_NOTSUP); 395 395 return -1; -
libroar/vio_zlib.c
r5388 r5651 187 187 return -1; 188 188 189 ROAR_DBG("roar_vio_zlib_read(vio=%p, buf=%p, count=%llu) = ?", vio, buf, (long long unsigned)count , self->inbuf);189 ROAR_DBG("roar_vio_zlib_read(vio=%p, buf=%p, count=%llu) = ?", vio, buf, (long long unsigned)count); 190 190 191 191 self->decompressor.next_out = buf; -
libroar/vs.c
r5414 r5651 194 194 } 195 195 } else { 196 ROAR_WARN("_handle_async_req(vss=%p, error=%p): Got unexpected reply for command GET_STREAM_PARA, subcommand ", vss, error, subcmd);196 ROAR_WARN("_handle_async_req(vss=%p, error=%p): Got unexpected reply for command GET_STREAM_PARA, subcommand %i", vss, error, subcmd); 197 197 } 198 198 break; -
libroardsp/convert.c
r5381 r5651 1063 1063 memcpy(&cinfo, from, sizeof(cinfo)); 1064 1064 1065 ROAR_DBG("roar_conv2(out=%p, in=%p, inlen=%lu, from=%p{...}, to=%p{...}, bufsize=%lu", out, in, inlen, from, to,bufsize);1065 ROAR_DBG("roar_conv2(out=%p, in=%p, inlen=%lu, from=%p{...}, to=%p{...}, bufsize=%lu", out, in, (unsigned long int)inlen, from, to, (unsigned long int)bufsize); 1066 1066 1067 1067 /* -
libroardsp/filter_dcblock.c
r5381 r5651 97 97 } 98 98 99 ROAR_DBG("roardsp_dcblock_calc16(*): s=% i (current block of %i samples)", s,samples);99 ROAR_DBG("roardsp_dcblock_calc16(*): s=%li (current block of %lu samples)", (long int)s, (unsigned long int)samples); 100 100 101 101 s = (float)(s / samples); … … 116 116 // s += (ROAR_INSTINT)filter->inst; 117 117 118 ROAR_DBG("roardsp_dcblock_calc16(*): new DC value: % i",s);118 ROAR_DBG("roardsp_dcblock_calc16(*): new DC value: %li", (long int)s); 119 119 120 120 for (i = 0; i < samples; i++) -
libroardsp/filter_goertzel.c
r5551 r5651 76 76 g /= 32767; \ 77 77 s = samp[i]; \ 78 ROAR_DBG("roardsp_goertzel_calc*(*): channel=%i, g=%f, s=%f, old[0]=% f, old[1]=%f", channel, g, s, self->old[channel][0],self->old[channel][1]); \78 ROAR_DBG("roardsp_goertzel_calc*(*): channel=%i, g=%f, s=%f, old[0]=%li, old[1]=%li", channel, g, s, (long int)self->old[channel][0], (long int)self->old[channel][1]); \ 79 79 s += g; \ 80 80 s -= self->old[channel][1]; \ -
roarclients/roarvorbis.c
r5534 r5651 64 64 r = roar_vio_read(datasource, ptr, size*nmemb); 65 65 66 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p): r=%i", ptr, size,nmemb, datasource, r);66 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p): r=%i", ptr, (unsigned long int)size, (unsigned long int)nmemb, datasource, r); 67 67 68 68 if ( r == -1 ) … … 74 74 r /= size; 75 75 76 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p) = %i", ptr, size,nmemb, datasource, r);76 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p) = %i", ptr, (unsigned long int)size, (unsigned long int)nmemb, datasource, r); 77 77 return r; 78 78 } … … 115 115 116 116 if ( vclt != NULL ) { 117 roar_vio_printf(vclt, "AUDIOINFO=rate:% iHz, channels:%i\n", vi->rate,vi->channels);117 roar_vio_printf(vclt, "AUDIOINFO=rate:%liHz, channels:%li\n", (long int)vi->rate, (long int)vi->channels); 118 118 } 119 119 -
roard/codecfilter_flac.c
r5624 r5651 153 153 if ( stream_meta_add(ROAR_STREAM(self->ss)->id, type, "", value) == -1 ) { 154 154 ROAR_WARN("cf_flac_cb_metadata(..., client_data=%p{ROAR_STREAM(.ss)->id=%i}): Can not add meta data: %s", 155 ROAR_STREAM(self->ss)->id, roar_error2str(roar_error));155 self->ss, ROAR_STREAM(self->ss)->id, roar_error2str(roar_error)); 156 156 } 157 157 -
roard/codecfilter_vorbis.c
r5625 r5651 48 48 r = stream_vio_s_read(ROAR_STREAM_SERVER(datasource), ptr, size*nmemb); 49 49 50 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p): r=%i", ptr, size,nmemb, datasource, r);50 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p): r=%i", ptr, (unsigned long int)size, (unsigned long int)nmemb, datasource, r); 51 51 52 52 if ( r == -1 ) { 53 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p) = 0 // roar_error=%i(%s)", ptr, size,nmemb, datasource, roar_error, roar_error2str(roar_error));53 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p) = 0 // roar_error=%i(%s)", ptr, (unsigned long int)size, (unsigned long int)nmemb, datasource, roar_error, roar_error2str(roar_error)); 54 54 return 0; 55 55 } … … 61 61 r /= size; 62 62 63 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p) = %i", ptr, size,nmemb, datasource, r);63 ROAR_DBG("cf_vorbis_vfvio_read(ptr=%p, size=%lu, nmemb=%lu, datasource=%p) = %i", ptr, (unsigned long int)size, (unsigned long int)nmemb, datasource, r); 64 64 return r; 65 65 } … … 289 289 } 290 290 291 ROAR_DBG("ov_read(*) = % i",done);291 ROAR_DBG("ov_read(*) = %li", (long int)done); 292 292 293 293 if ( done == 0 ) { -
roard/lib.c
r5619 r5651 32 32 size_t i; 33 33 34 ROAR_WARN("lib_run_bg(cmd='%s', ...): This function should never be called. Contact devels." );34 ROAR_WARN("lib_run_bg(cmd='%s', ...): This function should never be called. Contact devels.", cmd); 35 35 36 36 child = roar_fork(NULL); -
roard/midi.c
r5417 r5651 823 823 824 824 if ( streams_get_flag(g_midi_clock.stream, ROAR_FLAG_SYNC) ) { 825 ROAR_DBG("midi_clock_tick(void): TICK! (nt=%lu)", g_midi_clock.nt);825 ROAR_DBG("midi_clock_tick(void): TICK! (nt=%lu)", (unsigned long int)g_midi_clock.nt); 826 826 if ( midi_new_bufmes(&buf, &mes) == -1 ) { 827 827 ROAR_ERR("midi_clock_tick(void): Can not create Clock-Tick-Message"); … … 839 839 ss->state = ROAR_STREAMSTATE_OLD; 840 840 } else { 841 ROAR_DBG("midi_clock_tick(void): silent tick. (nt=%lu)", g_midi_clock.nt);841 ROAR_DBG("midi_clock_tick(void): silent tick. (nt=%lu)", (unsigned long int)g_midi_clock.nt); 842 842 } 843 843 } -
roard/roard.c
r5624 r5651 977 977 protoname = roar_proto2str(g_listen[i].proto); 978 978 if ( protoname == NULL ) { 979 ROAR_ERR("check_listen(void): protocol %i is unknown (protocol ID not assigned?)." );979 ROAR_ERR("check_listen(void): protocol %i is unknown (protocol ID not assigned?).", g_listen[i].proto); 980 980 } else { 981 981 ROAR_DBG("check_listen(void): Unknown protocol %s(%i) is used.", protoname, g_listen[i].proto); … … 1226 1226 if ( roar_x11_delete_prop(x11con, "ROAR_SERVER") == -1 ) { 1227 1227 ret = -1; 1228 ROAR_ERR("Error while unregistereing from X11" , ROAR_DBG_INFO_INFO);1228 ROAR_ERR("Error while unregistereing from X11"); 1229 1229 } else { 1230 1230 ROAR_INFO("Successfully unregistered from X11", ROAR_DBG_INFO_INFO); … … 1233 1233 if ( roar_x11_set_prop(x11con, "ROAR_SERVER", sockname) == -1 ) { 1234 1234 ret = -1; 1235 ROAR_ERR("Error while registereing to X11" , ROAR_DBG_INFO_INFO);1235 ROAR_ERR("Error while registereing to X11"); 1236 1236 } else { 1237 1237 ROAR_INFO("Successfully registered to X11", ROAR_DBG_INFO_INFO);
Note: See TracChangeset
for help on using the changeset viewer.