Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Patch
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: freeswitch-core
-
Labels:None
-
Environment:clang version 2.8 (trunk 109969), x86_64-unknown-linux-gnu
-
Platform:Linux x86_64/gcc
-
FreeSWITCH GIT Revision:00fc32ecefc32c342d311889e5eb32f891e554f8
-
Reproduced with GIT HEAD?:yes
Description
Clang has -Wempty-body enabled by default and FS has -Werror in SWITCH_AM_CFLAGS -> fail.
Attached patch fixes such errors in FSCORE.
Attached patch fixes such errors in FSCORE.
-
- 0001-Fix-default-clang-build-except-mod_sofia.patch
- 14/Jan/12 4:33 PM
- 6 kB
- ojab
-
- 0001-Fix-default-clang-build-except-mod_sofia-mod_spandsp.patch
- 07/Jan/12 3:58 PM
- 22 kB
- ojab
-
- clang_diff.patch
- 01/Aug/10 11:12 AM
- 2 kB
- ojab
-
- clang_mod.patch
- 28/Dec/11 12:40 PM
- 10 kB
- ojab
-
- clang.patch
- 28/Dec/11 3:19 AM
- 6 kB
- ojab
-
- clang2.patch
- 29/Dec/11 4:11 AM
- 19 kB
- ojab
-
- empty-body.patch
- 28/Dec/11 1:51 AM
- 0.4 kB
- ojab
-
- fs_switch-enum-redundant-default.patch
- 27/Jan/12 7:39 AM
- 4 kB
- ojab
-
- mod_conference-clang.patch
- 01/Aug/10 4:51 PM
- 0.9 kB
- ojab
Issue Links
- is duplicated by
-
FS-348
Disable -Werror if compiled with clang
-
Activity
Hide
Permalink
ojab
added a comment -
mod_conference fix
Show
ojab
added a comment - mod_conference fix
Hide
Git
added a comment -
Repository: freeswitch
Branch: refs/heads/master
Commit: e566057 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=e566057
Closed By: mochouinard@moctel.com
Comment:
FS-2216 --resolve
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Branch: refs/heads/master
Commit: e566057 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=e566057
Closed By: mochouinard@moctel.com
Comment:
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Show
Git
added a comment - Repository: freeswitch
Branch: refs/heads/master
Commit: e566057 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=e566057
Closed By: mochouinard@moctel.com
Comment:
FS-2216 --resolve
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Hide
Auto Admin
added a comment -
Due to a long period of inactivity (13 or more days), this issue is due to be automatically close within 24 hours.
If this issue is not actually resolved, please reopen it and add appropriate comments to help developers fix the issue.
Thanks,
Jira Admin
If this issue is not actually resolved, please reopen it and add appropriate comments to help developers fix the issue.
Thanks,
Jira Admin
Show
Auto Admin
added a comment - Due to a long period of inactivity (13 or more days), this issue is due to be automatically close within 24 hours.
If this issue is not actually resolved, please reopen it and add appropriate comments to help developers fix the issue.
Thanks,
Jira Admin
Hide
Auto Admin
added a comment -
Since there has been no change to the status of this issue, it is being closed for inactivity
Thanks,
Jira Admin
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Thanks,
Jira Admin
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Show
Auto Admin
added a comment - Since there has been no change to the status of this issue, it is being closed for inactivity
Thanks,
Jira Admin
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Hide
Anthony Minessale II
added a comment -
if you have instances of unsigned getting assigned from output of atoi or being treated as signed, omitting it is not a solution.
if you say
unsigned int foo = atoi("-12");
it can still be casted to int and will hold the correct value.
This is wrong but simple omissions like those suggested can lead to unexpected side effects.
It would be preferable to convert the data to the proper type or fix it in a way that changes the least code or heavy regressing testing will be important. There is no atoi or atol type function that is portable that is exclusive to unsigned.
Perhaps make one and add it to switch utils and use it in these cases.
It would save a step of constantly verifying regular atoi calls.
if you say
unsigned int foo = atoi("-12");
it can still be casted to int and will hold the correct value.
This is wrong but simple omissions like those suggested can lead to unexpected side effects.
It would be preferable to convert the data to the proper type or fix it in a way that changes the least code or heavy regressing testing will be important. There is no atoi or atol type function that is portable that is exclusive to unsigned.
Perhaps make one and add it to switch utils and use it in these cases.
It would save a step of constantly verifying regular atoi calls.
Show
Anthony Minessale II
added a comment - if you have instances of unsigned getting assigned from output of atoi or being treated as signed, omitting it is not a solution.
if you say
unsigned int foo = atoi("-12");
it can still be casted to int and will hold the correct value.
This is wrong but simple omissions like those suggested can lead to unexpected side effects.
It would be preferable to convert the data to the proper type or fix it in a way that changes the least code or heavy regressing testing will be important. There is no atoi or atol type function that is portable that is exclusive to unsigned.
Perhaps make one and add it to switch utils and use it in these cases.
It would save a step of constantly verifying regular atoi calls.
Hide
Git
added a comment -
Repository: freeswitch
Branch: refs/heads/master
Commit: 2428883 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=2428883
Updated By: jeff@jefflenk.com
Comment:
FS-2216 partial with renaming
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Branch: refs/heads/master
Commit: 2428883 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=2428883
Updated By: jeff@jefflenk.com
Comment:
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Show
Git
added a comment - Repository: freeswitch
Branch: refs/heads/master
Commit: 2428883 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=2428883
Updated By: jeff@jefflenk.com
Comment:
FS-2216 partial with renaming
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Hide
Git
added a comment -
Repository: freeswitch
Branch: refs/heads/master
Commit: 472ab0c http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=472ab0c
Updated By: jeff@jefflenk.com
Comment:
FS-2216 partial
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Branch: refs/heads/master
Commit: 472ab0c http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=472ab0c
Updated By: jeff@jefflenk.com
Comment:
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Show
Git
added a comment - Repository: freeswitch
Branch: refs/heads/master
Commit: 472ab0c http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=472ab0c
Updated By: jeff@jefflenk.com
Comment:
FS-2216 partial
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Hide
Git
added a comment -
Repository: freeswitch
Branch: refs/heads/master
Commit: 6e83414 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=6e83414
Updated By: jeff@jefflenk.com
Comment:
FS-2216 clang change
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Branch: refs/heads/master
Commit: 6e83414 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=6e83414
Updated By: jeff@jefflenk.com
Comment:
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Show
Git
added a comment - Repository: freeswitch
Branch: refs/heads/master
Commit: 6e83414 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=6e83414
Updated By: jeff@jefflenk.com
Comment:
FS-2216 clang change
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Hide
Git
added a comment -
Repository: freeswitch
Branch: refs/heads/master
Commit: 049be82 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=049be82
Updated By: anthm@freeswitch.org
Comment:
FS-2216 found one bug that is 4 years old from commit 205cf0534f4c4c5a8ebccb2446a01ed0df100abb
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Branch: refs/heads/master
Commit: 049be82 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=049be82
Updated By: anthm@freeswitch.org
Comment:
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Show
Git
added a comment - Repository: freeswitch
Branch: refs/heads/master
Commit: 049be82 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=049be82
Updated By: anthm@freeswitch.org
Comment:
FS-2216 found one bug that is 4 years old from commit 205cf0534f4c4c5a8ebccb2446a01ed0df100abb
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Hide
Git
added a comment -
Repository: freeswitch
Branch: refs/heads/master
Commit: 812e5e9 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=812e5e9
Updated By: anthm@freeswitch.org
Comment:
FS-2216
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Branch: refs/heads/master
Commit: 812e5e9 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=812e5e9
Updated By: anthm@freeswitch.org
Comment:
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Show
Git
added a comment - Repository: freeswitch
Branch: refs/heads/master
Commit: 812e5e9 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=812e5e9
Updated By: anthm@freeswitch.org
Comment:
FS-2216
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Hide
ojab
added a comment -
New warning switch was added in llvm-trunk, so there is more errors https://llvm.org/viewvc/llvm-project?view=rev&sortby=rev&revision=148640
Patch in the attached file.
Patch in the attached file.
Hide
Anthony Minessale II
added a comment -
That one seems kind of overzealous.
What if someone injects some int value that is not in the enum?
What if someone injects some int value that is not in the enum?
Show
Anthony Minessale II
added a comment - That one seems kind of overzealous.
What if someone injects some int value that is not in the enum?
Hide
ojab
added a comment -
Travis Cross has fixed most of the warnings in the meantime. I can build FS-git-3708c962 using version 3.2 (trunk 159643) with the only following change:
diff --git a/src/fs_encode.c b/src/fs_encode.c
index efd9373..7606138 100644
--- a/src/fs_encode.c
+++ b/src/fs_encode.c
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
switch_codec_t codec = { 0 };
char buf[2048];
switch_size_t len = sizeof(buf)/2;
- switch_memory_pool_t *pool;
+ switch_memory_pool_t *pool = NULL;
int bitrate = 0;
int blocksize;
diff --git a/src/fs_encode.c b/src/fs_encode.c
index efd9373..7606138 100644
--- a/src/fs_encode.c
+++ b/src/fs_encode.c
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
switch_codec_t codec = { 0 };
char buf[2048];
switch_size_t len = sizeof(buf)/2;
- switch_memory_pool_t *pool;
+ switch_memory_pool_t *pool = NULL;
int bitrate = 0;
int blocksize;
Show
ojab
added a comment - Travis Cross has fixed most of the warnings in the meantime. I can build FS-git-3708c962 using version 3.2 (trunk 159643) with the only following change:
diff --git a/src/fs_encode.c b/src/fs_encode.c
index efd9373..7606138 100644
--- a/src/fs_encode.c
+++ b/src/fs_encode.c
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
switch_codec_t codec = { 0 };
char buf[2048];
switch_size_t len = sizeof(buf)/2;
- switch_memory_pool_t *pool;
+ switch_memory_pool_t *pool = NULL;
int bitrate = 0;
int blocksize;
Hide
Git
added a comment -
Repository: freeswitch
Branch: refs/heads/master
Commit: 305aa77 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=305aa77
Closed By: jeff@jefflenk.com
Comment:
FS-2216 --resolve clang
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Branch: refs/heads/master
Commit: 305aa77 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=305aa77
Closed By: jeff@jefflenk.com
Comment:
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Show
Git
added a comment - Repository: freeswitch
Branch: refs/heads/master
Commit: 305aa77 http://fisheye.freeswitch.org/changelog/freeswitch.git/?cs=305aa77
Closed By: jeff@jefflenk.com
Comment:
FS-2216 --resolve clang
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Hide
Auto Admin
added a comment -
Due to a long period of inactivity (13 or more days), this issue is due to be automatically close within 24 hours.
If this issue is not actually resolved, please reopen it and add appropriate comments to help developers fix the issue.
Thanks,
Jira Admin
If this issue is not actually resolved, please reopen it and add appropriate comments to help developers fix the issue.
Thanks,
Jira Admin
Show
Auto Admin
added a comment - Due to a long period of inactivity (13 or more days), this issue is due to be automatically close within 24 hours.
If this issue is not actually resolved, please reopen it and add appropriate comments to help developers fix the issue.
Thanks,
Jira Admin
Hide
Auto Admin
added a comment -
Since there has been no change to the status of this issue, it is being closed for inactivity
Thanks,
Jira Admin
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Thanks,
Jira Admin
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com
Show
Auto Admin
added a comment - Since there has been no change to the status of this issue, it is being closed for inactivity
Thanks,
Jira Admin
FreeSWITCH Support Contracts and Consulting Services available!
Contact us:
Email: consulting@freeswitch.org
Web: http://www.freeswitch.org
Phone: +1-918-420-9266
Tollfree: +1-877-742-2583
Fax: +1-918-420-9267
iNum: +883 5100 1420 9266
Come To ClueCon in August to learn more about FreeSWITCH and Internet Telephony!
http://www.cluecon.com