[svn-commits] tilghman: trunk r130697 - in /trunk: channels/ channels/h323/ channels/misdn/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 14 10:44:07 CDT 2008


Author: tilghman
Date: Mon Jul 14 10:44:07 2008
New Revision: 130697

URL: http://svn.digium.com/view/asterisk?view=rev&rev=130697
Log:
Swap "static" and "const", so that "static" appears at the beginning of each
declaration (suppresses a warning).
(closes issue #13070)
 Reported by: gknispel_proformatique
 Patches: 
       asterisk_trunk_const_static.patch uploaded by gknispel (license 261)

Modified:
    trunk/channels/chan_unistim.c
    trunk/channels/h323/ast_h323.cxx
    trunk/channels/misdn/isdn_lib.c
    trunk/include/asterisk/module.h

Modified: trunk/channels/chan_unistim.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=130697&r1=130696&r2=130697
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Mon Jul 14 10:44:07 2008
@@ -496,48 +496,48 @@
  * byte 5 : direction, 1 = server to phone, 2 = phone to server arguments
  */
 
-const static unsigned char packet_rcv_discovery[] =
+static const unsigned char packet_rcv_discovery[] =
 	{ 0xff, 0xff, 0xff, 0xff, 0x02, 0x02, 0xff, 0xff, 0xff, 0xff, 0x9e, 0x03, 0x08 };
 static unsigned char packet_send_discovery_ack[] =
 	{ 0x00, 0x00, /*Initial Seq (2 bytes) */ 0x00, 0x00, 0x00, 0x01 };
 
-const static unsigned char packet_recv_firm_version[] =
+static const unsigned char packet_recv_firm_version[] =
 	{ 0x00, 0x00, 0x00, 0x13, 0x9a, 0x0a, 0x02 };
-const static unsigned char packet_recv_pressed_key[] =
+static const unsigned char packet_recv_pressed_key[] =
 	{ 0x00, 0x00, 0x00, 0x13, 0x99, 0x04, 0x00 };
-const static unsigned char packet_recv_pick_up[] =
+static const unsigned char packet_recv_pick_up[] =
 	{ 0x00, 0x00, 0x00, 0x13, 0x99, 0x03, 0x04 };
-const static unsigned char packet_recv_hangup[] =
+static const unsigned char packet_recv_hangup[] =
 	{ 0x00, 0x00, 0x00, 0x13, 0x99, 0x03, 0x03 };
-const static unsigned char packet_recv_r2[] = { 0x00, 0x00, 0x00, 0x13, 0x96, 0x03, 0x03 };
+static const unsigned char packet_recv_r2[] = { 0x00, 0x00, 0x00, 0x13, 0x96, 0x03, 0x03 };
 
 /*! TransportAdapter */
-const static unsigned char packet_recv_resume_connection_with_server[] =
+static const unsigned char packet_recv_resume_connection_with_server[] =
 	{ 0xff, 0xff, 0xff, 0xff, 0x9e, 0x03, 0x08 };
-const static unsigned char packet_recv_mac_addr[] =
+static const unsigned char packet_recv_mac_addr[] =
 	{ 0xff, 0xff, 0xff, 0xff, 0x9a, 0x0d, 0x07 /*MacAddr */  };
 
-const static unsigned char packet_send_date_time3[] =
+static const unsigned char packet_send_date_time3[] =
 	{ 0x11, 0x09, 0x02, 0x02, /*Month */ 0x05, /*Day */ 0x06, /*Hour */ 0x07,
 /*Minutes */ 0x08, 0x32
 };
-const static unsigned char packet_send_date_time[] =
+static const unsigned char packet_send_date_time[] =
 	{ 0x11, 0x09, 0x02, 0x0a, /*Month */ 0x05, /*Day */ 0x06, /*Hour */ 0x07, /*Minutes */
 0x08, 0x32, 0x17, 0x04, 0x24, 0x07, 0x19,
 	0x04, 0x07, 0x00, 0x19, 0x05, 0x09, 0x3e, 0x0f, 0x16, 0x05, 0x00, 0x80, 0x00, 0x1e,
 		0x05, 0x12, 0x00, 0x78
 };
 
-const static unsigned char packet_send_no_ring[] =
+static const unsigned char packet_send_no_ring[] =
 	{ 0x16, 0x04, 0x1a, 0x00, 0x16, 0x04, 0x11, 0x00 };
-const static unsigned char packet_send_s4[] =
+static const unsigned char packet_send_s4[] =
 	{ 0x16, 0x04, 0x1a, 0x00, 0x16, 0x04, 0x11, 0x00, 0x16, 0x06, 0x32, 0xdf, 0x00, 0xff,
 0x16, 0x05, 0x1c, 0x00, 0x00, 0x17, 0x05,
 	0x0b, 0x00, 0x00, 0x19, 0x04, 0x00, 0x00, 0x19, 0x04, 0x00, 0x08, 0x19, 0x04, 0x00,
 		0x10, 0x19, 0x04, 0x00, 0x18, 0x16, 0x05,
 	0x31, 0x00, 0x00, 0x16, 0x05, 0x04, 0x00, 0x00
 };
-const static unsigned char packet_send_call[] =
+static const unsigned char packet_send_call[] =
 	{ 0x16, 0x04, 0x1a, 0x00, 0x16, 0x04, 0x11, 0x00, 0x16, 0x06, 0x32, 0xdf,
 	0x00, 0xff, 0x16, 0x05, 0x1c, 0x00, 0x00, 0x16, 0x0a, 0x38, 0x00, 0x12, 0xca, 0x03,
 		0xc0, 0xc3, 0xc5, 0x16, 0x16, 0x30, 0x00,
@@ -546,36 +546,36 @@
 	/*port RTP */ 0x0f, 0xa0, /* port RTCP */ 0x9c, 0x41, /* IP Address */ 0x0a, 0x01,
 		0x16, 0x66
 };
-const static unsigned char packet_send_stream_based_tone_off[] =
+static const unsigned char packet_send_stream_based_tone_off[] =
 	{ 0x16, 0x05, 0x1c, 0x00, 0x00 };
 
-/* const static unsigned char packet_send_Mute[] = { 0x16, 0x05, 0x04, 0x00, 0x00 };
-const static unsigned char packet_send_CloseAudioStreamRX[] = { 0x16, 0x05, 0x31, 0x00, 0xff };
-const static unsigned char packet_send_CloseAudioStreamTX[] = { 0x16, 0x05, 0x31, 0xff, 0x00 };*/
-const static unsigned char packet_send_stream_based_tone_on[] =
+/* static const unsigned char packet_send_Mute[] = { 0x16, 0x05, 0x04, 0x00, 0x00 };
+static const unsigned char packet_send_CloseAudioStreamRX[] = { 0x16, 0x05, 0x31, 0x00, 0xff };
+static const unsigned char packet_send_CloseAudioStreamTX[] = { 0x16, 0x05, 0x31, 0xff, 0x00 };*/
+static const unsigned char packet_send_stream_based_tone_on[] =
 	{ 0x16, 0x06, 0x1b, 0x00, 0x00, 0x05 };
-const static unsigned char packet_send_stream_based_tone_single_freq[] =
+static const unsigned char packet_send_stream_based_tone_single_freq[] =
 	{ 0x16, 0x06, 0x1d, 0x00, 0x01, 0xb8 };
-const static unsigned char packet_send_stream_based_tone_dial_freq[] =
+static const unsigned char packet_send_stream_based_tone_dial_freq[] =
 	{ 0x16, 0x08, 0x1d, 0x00, 0x01, 0xb8, 0x01, 0x5e };
-const static unsigned char packet_send_select_output[] =
+static const unsigned char packet_send_select_output[] =
 	{ 0x16, 0x06, 0x32, 0xc0, 0x01, 0x00 };
-const static unsigned char packet_send_ring[] =
+static const unsigned char packet_send_ring[] =
 	{ 0x16, 0x06, 0x32, 0xdf, 0x00, 0xff, 0x16, 0x05, 0x1c, 0x00, 0x00, 0x16,
 	0x04, 0x1a, 0x01, 0x16, 0x05, 0x12, 0x13 /* Ring type 10 to 17 */ , 0x18, 0x16, 0x04, 0x18,     /* volume 00, 10, 20... */
 	0x20, 0x16, 0x04, 0x10, 0x00
 };
-const static unsigned char packet_send_end_call[] =
+static const unsigned char packet_send_end_call[] =
 	{ 0x16, 0x06, 0x32, 0xdf, 0x00, 0xff, 0x16, 0x05, 0x31, 0x00, 0x00, 0x19, 0x04, 0x00,
 0x10, 0x19, 0x04, 0x00, 0x18, 0x16, 0x05,
 	0x04, 0x00, 0x00, 0x16, 0x04, 0x37, 0x10
 };
-const static unsigned char packet_send_s9[] =
+static const unsigned char packet_send_s9[] =
 	{ 0x16, 0x06, 0x32, 0xdf, 0x00, 0xff, 0x19, 0x04, 0x00, 0x10, 0x16, 0x05, 0x1c, 0x00,
 0x00 };
-const static unsigned char packet_send_rtp_packet_size[] =
+static const unsigned char packet_send_rtp_packet_size[] =
 	{ 0x16, 0x08, 0x38, 0x00, 0x00, 0xe0, 0x00, 0xa0 };
-const static unsigned char packet_send_jitter_buffer_conf[] =
+static const unsigned char packet_send_jitter_buffer_conf[] =
 	{ 0x16, 0x0e, 0x3a, 0x00, /* jitter */ 0x02, /* high water mark */ 0x04, 0x00, 0x00,
 /* early packet resync 2 bytes */ 0x3e, 0x80,
 	0x00, 0x00, /* late packet resync 2 bytes */ 0x3e, 0x80
@@ -584,86 +584,86 @@
 /* Duration in ms div 2 (0x20 = 64ms, 0x08 = 16ms) 
 static unsigned char packet_send_StreamBasedToneCad[] =
   { 0x16, 0x0a, 0x1e, 0x00, duration on  0x0a, duration off  0x0d, duration on 0x0a, duration off 0x0d, duration on 0x0a, duration off 0x2b }; */
-const static unsigned char packet_send_open_audio_stream_rx[] =
+static const unsigned char packet_send_open_audio_stream_rx[] =
 	{ 0x16, 0x1a, 0x30, 0x00, 0xff, /* Codec */ 0x00, 0x00, 0x01, 0x00, 0xb8, 0xb8, 0x0e,
 0x0e, 0x01, /* Port */ 0x14, 0x50, 0x00,
 	0x00, /* Port */ 0x14, 0x50, 0x00, 0x00, /* Dest IP */ 0x0a, 0x93, 0x69, 0x05
 };
-const static unsigned char packet_send_open_audio_stream_tx[] =
+static const unsigned char packet_send_open_audio_stream_tx[] =
 	{ 0x16, 0x1a, 0x30, 0xff, 0x00, 0x00, /* Codec */ 0x00, 0x01, 0x00, 0xb8, 0xb8, 0x0e,
 0x0e, 0x01, /* Local port */ 0x14, 0x50,
 	0x00, 0x00, /* Rmt Port */ 0x14, 0x50, 0x00, 0x00, /* Dest IP */ 0x0a, 0x93, 0x69, 0x05
 };
 
-const static unsigned char packet_send_open_audio_stream_rx3[] =
+static const unsigned char packet_send_open_audio_stream_rx3[] =
 	{ 0x16, 0x1a, 0x30, 0x00, 0xff, /* Codec */ 0x00, 0x00, 0x02, 0x01, 0xb8, 0xb8, 0x06,
 0x06, 0x81, /* RTP Port */ 0x14, 0x50,
 /* RTCP Port */ 0x14,
 	0x51, /* RTP Port */ 0x14, 0x50, /* RTCP Port */ 0x00, 0x00, /* Dest IP */ 0x0a, 0x93,
 		0x69, 0x05
 };
-const static unsigned char packet_send_open_audio_stream_tx3[] =
+static const unsigned char packet_send_open_audio_stream_tx3[] =
 	{ 0x16, 0x1a, 0x30, 0xff, 0x00, 0x00, /* Codec */ 0x00, 0x02, 0x01, 0xb8, 0xb8, 0x06,
 0x06, 0x81, /* RTP Local port */ 0x14, 0x50,
 	/* RTCP Port */ 0x00, 0x00, /* RTP Rmt Port */ 0x14, 0x50, /* RTCP Port */ 0x00, 0x00,
 		/* Dest IP */ 0x0a, 0x93, 0x69, 0x05
 };
 
-const static unsigned char packet_send_arrow[] = { 0x17, 0x04, 0x04, 0x00 };
-const static unsigned char packet_send_blink_cursor[] = { 0x17, 0x04, 0x10, 0x86 };
-const static unsigned char packet_send_date_time2[] = { 0x17, 0x04, 0x17, 0x3d, 0x11, 0x09, 0x02, 0x0a, /*Month */ 0x05,   /*Day */
+static const unsigned char packet_send_arrow[] = { 0x17, 0x04, 0x04, 0x00 };
+static const unsigned char packet_send_blink_cursor[] = { 0x17, 0x04, 0x10, 0x86 };
+static const unsigned char packet_send_date_time2[] = { 0x17, 0x04, 0x17, 0x3d, 0x11, 0x09, 0x02, 0x0a, /*Month */ 0x05,   /*Day */
 	0x06, /*Hour */ 0x07, /*Minutes */ 0x08, 0x32
 };
-const static unsigned char packet_send_Contrast[] =
+static const unsigned char packet_send_Contrast[] =
 	{ 0x17, 0x04, 0x24, /*Contrast */ 0x08 };
-const static unsigned char packet_send_StartTimer[] =
+static const unsigned char packet_send_StartTimer[] =
 	{ 0x17, 0x05, 0x0b, 0x05, 0x00, 0x17, 0x08, 0x16, /* Text */ 0x44, 0x75, 0x72, 0xe9,
 0x65 };
-const static unsigned char packet_send_stop_timer[] = { 0x17, 0x05, 0x0b, 0x02, 0x00 };
-const static unsigned char packet_send_icon[] = { 0x17, 0x05, 0x14, /*pos */ 0x00, /*icon */ 0x25 };      /* display an icon in front of the text zone */
-const static unsigned char packet_send_S7[] = { 0x17, 0x06, 0x0f, 0x30, 0x07, 0x07 };
-const static unsigned char packet_send_set_pos_cursor[] =
+static const unsigned char packet_send_stop_timer[] = { 0x17, 0x05, 0x0b, 0x02, 0x00 };
+static const unsigned char packet_send_icon[] = { 0x17, 0x05, 0x14, /*pos */ 0x00, /*icon */ 0x25 };      /* display an icon in front of the text zone */
+static const unsigned char packet_send_S7[] = { 0x17, 0x06, 0x0f, 0x30, 0x07, 0x07 };
+static const unsigned char packet_send_set_pos_cursor[] =
 	{ 0x17, 0x06, 0x10, 0x81, 0x04, /*pos */ 0x20 };
 
 /*static unsigned char packet_send_MonthLabelsDownload[] =
   { 0x17, 0x0a, 0x15,  Month (3 char)  0x46, 0x65, 0x62, 0x4d, 0xe4, 0x72, 0x20 }; */
-const static unsigned char packet_send_favorite[] =
+static const unsigned char packet_send_favorite[] =
 	{ 0x17, 0x0f, 0x19, 0x10, /*pos */ 0x01, /*name */ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
 0x20, 0x20, 0x20, 0x20, /*end_name */ 0x19,
 	0x05, 0x0f, /*pos */ 0x01, /*icone */ 0x00
 };
-const static unsigned char packet_send_title[] =
+static const unsigned char packet_send_title[] =
 	{ 0x17, 0x10, 0x19, 0x02, /*text */ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
 0x20, 0x20, 0x20, 0x20 /*end_text */  };
-const static unsigned char packet_send_text[] =
+static const unsigned char packet_send_text[] =
 	{ 0x17, 0x1e, 0x1b, 0x04, /*pos */ 0x00, /*inverse */ 0x25, /*text */ 0x20, 0x20,
 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
 		/*end_text */ 0x17, 0x04, 0x10, 0x87
 };
-const static unsigned char packet_send_status[] =
+static const unsigned char packet_send_status[] =
 	{ 0x17, 0x20, 0x19, 0x08, /*text */ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20    /*end_text */
 };
-const static unsigned char packet_send_status2[] =
+static const unsigned char packet_send_status2[] =
 	{ 0x17, 0x0b, 0x19, /* pos [08|28|48|68] */ 0x00, /* text */ 0x20, 0x20, 0x20, 0x20,
 0x20, 0x20, 0x20 /* end_text */  };
 
-const static unsigned char packet_send_led_update[] = { 0x19, 0x04, 0x00, 0x00 };
-
-const static unsigned char packet_send_query_basic_manager_04[] = { 0x1a, 0x04, 0x01, 0x04 };
-const static unsigned char packet_send_query_mac_address[] = { 0x1a, 0x04, 0x01, 0x08 };
-const static unsigned char packet_send_query_basic_manager_10[] = { 0x1a, 0x04, 0x01, 0x10 };
-const static unsigned char packet_send_S1[] = { 0x1a, 0x07, 0x07, 0x00, 0x00, 0x00, 0x13 };
+static const unsigned char packet_send_led_update[] = { 0x19, 0x04, 0x00, 0x00 };
+
+static const unsigned char packet_send_query_basic_manager_04[] = { 0x1a, 0x04, 0x01, 0x04 };
+static const unsigned char packet_send_query_mac_address[] = { 0x1a, 0x04, 0x01, 0x08 };
+static const unsigned char packet_send_query_basic_manager_10[] = { 0x1a, 0x04, 0x01, 0x10 };
+static const unsigned char packet_send_S1[] = { 0x1a, 0x07, 0x07, 0x00, 0x00, 0x00, 0x13 };
 
 static unsigned char packet_send_ping[] =
 	{ 0x1e, 0x05, 0x12, 0x00, /*Watchdog timer */ 0x78 };
 
 #define BUFFSEND unsigned char buffsend[64] = { 0x00, 0x00, 0xaa, 0xbb, 0x02, 0x01 }
 
-const static char tdesc[] = "UNISTIM Channel Driver";
-const static char type[] = "USTM";
+static const char tdesc[] = "UNISTIM Channel Driver";
+static const char type[] = "USTM";
 
 /*! Protos */
 static struct ast_channel *unistim_new(struct unistim_subchannel *sub, int state);

Modified: trunk/channels/h323/ast_h323.cxx
URL: http://svn.digium.com/view/asterisk/trunk/channels/h323/ast_h323.cxx?view=diff&rev=130697&r1=130696&r2=130697
==============================================================================
--- trunk/channels/h323/ast_h323.cxx (original)
+++ trunk/channels/h323/ast_h323.cxx Mon Jul 14 10:44:07 2008
@@ -956,7 +956,7 @@
 
 static BOOL EmbedCiscoTunneledInfo(H323SignalPDU &pdu)
 {
-	const static struct {
+	static const struct {
 		Q931::InformationElementCodes ie;
 		BOOL dontDelete;
 	} codes[] = {
@@ -1095,7 +1095,7 @@
 
 static BOOL EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
 {
-	const static Q931::InformationElementCodes codes[] =
+	static const Q931::InformationElementCodes codes[] =
 	{ Q931::RedirectingNumberIE, Q931::FacilityIE };
 
 	Q931 &q931 = pdu.GetQ931();

Modified: trunk/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_lib.c?view=diff&rev=130697&r1=130696&r2=130697
==============================================================================
--- trunk/channels/misdn/isdn_lib.c (original)
+++ trunk/channels/misdn/isdn_lib.c Mon Jul 14 10:44:07 2008
@@ -3964,7 +3964,7 @@
 
 void misdn_lib_nt_debug_init( int flags, char *file ) 
 {
-	int static init=0;
+	static int init=0;
 	char *f;
 	
 	if (!flags) 

Modified: trunk/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/module.h?view=diff&rev=130697&r1=130696&r2=130697
==============================================================================
--- trunk/include/asterisk/module.h (original)
+++ trunk/include/asterisk/module.h Mon Jul 14 10:44:07 2008
@@ -258,7 +258,7 @@
 	{ \
 		ast_module_unregister(&__mod_info); \
 	} \
-	const static __attribute__((unused)) struct ast_module_info *ast_module_info = &__mod_info
+	static const __attribute__((unused)) struct ast_module_info *ast_module_info = &__mod_info
 
 #define AST_MODULE_INFO_STANDARD(keystr, desc)		\
 	AST_MODULE_INFO(keystr, AST_MODFLAG_DEFAULT, desc,	\
@@ -271,7 +271,7 @@
 /* forward declare this pointer in modules, so that macro/function
    calls that need it can get it, since it will actually be declared
    and populated at the end of the module's source file... */
-const static __attribute__((unused)) struct ast_module_info *ast_module_info;
+static const __attribute__((unused)) struct ast_module_info *ast_module_info;
 
 #if !defined(EMBEDDED_MODULE)
 #define __MODULE_INFO_SECTION
@@ -352,7 +352,7 @@
 	{ \
 		ast_module_unregister(&__mod_info); \
 	} \
-	const static struct ast_module_info *ast_module_info = &__mod_info
+	static const struct ast_module_info *ast_module_info = &__mod_info
 
 #define AST_MODULE_INFO_STANDARD(keystr, desc)		\
 	AST_MODULE_INFO(keystr, AST_MODFLAG_DEFAULT, desc,	\




More information about the svn-commits mailing list