]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Replace GNU old-style field designator extensions to fix clang warnings
authorJonathan Rose <jrose@digium.com>
Wed, 4 Apr 2012 18:08:28 +0000 (18:08 +0000)
committerJonathan Rose <jrose@digium.com>
Wed, 4 Apr 2012 18:08:28 +0000 (18:08 +0000)
(issue ASTERISK-19540)
Reported by: Makoto Dei
Patches:
clang-gnu-designator.patch uploaded by Makoto Dei (license 5027)
........
Also add from the patch the portion in res_fax_spandsp that didn't apply to 1.8

Merged revisions 361142 from http://svn.asterisk.org/svn/asterisk/branches/1.8
(closes issue ASTERISK-19540)
........

Merged revisions 361143 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361155 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/chan_ooh323.c
apps/app_externalivr.c
apps/app_milliwatt.c
channels/chan_iax2.c
channels/chan_sip.c
main/app.c
main/channel.c
pbx/pbx_loopback.c
pbx/pbx_realtime.c
res/res_fax_spandsp.c

index f229e8693d4268db44bd57511a613de64a7a3f66..c395d9084ccc6d1963c4da6ae087a3f28883fa7b 100644 (file)
@@ -129,9 +129,9 @@ static struct ast_rtp_glue ooh323_rtp = {
 };
 
 static struct ast_udptl_protocol ooh323_udptl = {
-       type: "H323",
-       get_udptl_info: ooh323_get_udptl_peer,
-       set_udptl_peer: ooh323_set_udptl_peer,
+       .type = "H323",
+       .get_udptl_info = ooh323_get_udptl_peer,
+       .set_udptl_peer = ooh323_set_udptl_peer,
 };
 
 
index 5a320002ba6bd9136cd4a67f0ca3b9a316743db5..d9aaf67a95b2b7e20971ff094fd3bdaac05478c7 100644 (file)
@@ -293,9 +293,9 @@ static int gen_generate(struct ast_channel *chan, void *data, int len, int sampl
 
 static struct ast_generator gen =
 {
-       alloc: gen_alloc,
-       release: gen_release,
-       generate: gen_generate,
+       .alloc = gen_alloc,
+       .release = gen_release,
+       .generate = gen_generate,
 };
 
 static void ast_eivr_getvariable(struct ast_channel *chan, char *data, char *outbuf, int outbuflen)
index 75d8037d616c31836a051015d59cb3372a34f9dd..a4adc08c516a366667090353ae25ba1d5004a621 100644 (file)
@@ -117,9 +117,9 @@ static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int
 }
 
 static struct ast_generator milliwattgen = {
-       alloc: milliwatt_alloc,
-       release: milliwatt_release,
-       generate: milliwatt_generate,
+       .alloc = milliwatt_alloc,
+       .release = milliwatt_release,
+       .generate = milliwatt_generate,
 };
 
 static int old_milliwatt_exec(struct ast_channel *chan)
index 3928ed842e14ed644dbb1a53ba0e363335802bd5..cbc4858ac370babf2d548d866e9b1e6e2fbd4c92 100644 (file)
@@ -14036,12 +14036,12 @@ static int iax2_devicestate(const char *data)
 
 static struct ast_switch iax2_switch =
 {
-       name:        "IAX2",
-       description: "IAX Remote Dialplan Switch",
-       exists:      iax2_exists,
-       canmatch:    iax2_canmatch,
-       exec:        iax2_exec,
-       matchmore:   iax2_matchmore,
+       .name        = "IAX2",
+       .description = "IAX Remote Dialplan Switch",
+       .exists      = iax2_exists,
+       .canmatch    = iax2_canmatch,
+       .exec        = iax2_exec,
+       .matchmore   = iax2_matchmore,
 };
 
 /*
index f9fa5512e7913614b4242a100cea44837bd11d79..f46daf707b86a04ee077320d3a5ff993b9f4dc15 100644 (file)
@@ -3060,9 +3060,9 @@ static struct sip_registry *registry_addref(struct sip_registry *reg, char *tag)
 
 /*! \brief Interface structure with callbacks used to connect to UDPTL module*/
 static struct ast_udptl_protocol sip_udptl = {
-       type: "SIP",
-       get_udptl_info: sip_get_udptl_peer,
-       set_udptl_peer: sip_set_udptl_peer,
+       .type = "SIP",
+       .get_udptl_info = sip_get_udptl_peer,
+       .set_udptl_peer = sip_set_udptl_peer,
 };
 
 static void append_history_full(struct sip_pvt *p, const char *fmt, ...)
index bb6a9bd62e818b012aa60d97731a43b48d5e53c5..0634bb81974ce095067014327af041c49ec5884a 100644 (file)
@@ -578,9 +578,9 @@ static void *linear_alloc(struct ast_channel *chan, void *params)
 
 static struct ast_generator linearstream =
 {
-       alloc: linear_alloc,
-       release: linear_release,
-       generate: linear_generator,
+       .alloc = linear_alloc,
+       .release = linear_release,
+       .generate = linear_generator,
 };
 
 int ast_linear_stream(struct ast_channel *chan, const char *filename, int fd, int allowoverride)
index b86cd5252b50fd3ab05e7c1bb6adc1f3a08efd40..5f549f379d93cb301f59b3db2515372e4a05d487 100644 (file)
@@ -7714,9 +7714,9 @@ static int tonepair_generator(struct ast_channel *chan, void *data, int len, int
 }
 
 static struct ast_generator tonepair = {
-       alloc: tonepair_alloc,
-       release: tonepair_release,
-       generate: tonepair_generator,
+       .alloc = tonepair_alloc,
+       .release = tonepair_release,
+       .generate = tonepair_generator,
 };
 
 int ast_tonepair_start(struct ast_channel *chan, int freq1, int freq2, int duration, int vol)
index 915a0cb10a32ab1b5b8aa65e19f74519be09d72b..5f3561343496b93320f00d89d9faec1bded2613e 100644 (file)
@@ -163,12 +163,12 @@ static int loopback_matchmore(struct ast_channel *chan, const char *context, con
 
 static struct ast_switch loopback_switch =
 {
-        name:                   "Loopback",
-        description:                   "Loopback Dialplan Switch",
-        exists:                 loopback_exists,
-        canmatch:               loopback_canmatch,
-        exec:                   loopback_exec,
-        matchmore:              loopback_matchmore,
+       .name                   = "Loopback",
+       .description            = "Loopback Dialplan Switch",
+       .exists                 = loopback_exists,
+       .canmatch               = loopback_canmatch,
+       .exec                   = loopback_exec,
+       .matchmore              = loopback_matchmore,
 };
 
 static int unload_module(void)
index cc8bfc503365c208264c3978650fe932078b3b1b..fb2f41320a7ebfbb49ad95a42763be0ff18c1cbe 100644 (file)
@@ -388,12 +388,12 @@ static int realtime_matchmore(struct ast_channel *chan, const char *context, con
 
 static struct ast_switch realtime_switch =
 {
-        name:                   "Realtime",
-        description:                   "Realtime Dialplan Switch",
-        exists:                 realtime_exists,
-        canmatch:               realtime_canmatch,
-        exec:                   realtime_exec,
-        matchmore:              realtime_matchmore,
+       .name                   = "Realtime",
+       .description            = "Realtime Dialplan Switch",
+       .exists                 = realtime_exists,
+       .canmatch               = realtime_canmatch,
+       .exec                   = realtime_exec,
+       .matchmore              = realtime_matchmore,
 };
 
 static int unload_module(void)
index ffbb8999d19e64b40266dccf18fd81d302c1f395..901ec48c04f570e94404bf27d0dfc1b3a1b61cdb 100644 (file)
@@ -759,9 +759,9 @@ static int spandsp_fax_gateway_start(struct ast_fax_session *s) {
        int i;
        struct ast_channel *peer;
        static struct ast_generator t30_gen = {
-               alloc: spandsp_fax_gw_gen_alloc,
-               release: spandsp_fax_gw_gen_release,
-               generate: spandsp_fax_gw_t30_gen,
+               .alloc = spandsp_fax_gw_gen_alloc,
+               .release = spandsp_fax_gw_gen_release,
+               .generate = spandsp_fax_gw_t30_gen,
        };
 
 #if SPANDSP_RELEASE_DATE >= 20081012