Change in osmo-msc[master]: msc_main: Set copyright description field statically

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Jun 15 15:00:14 UTC 2018


Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/9636 )

Change subject: msc_main: Set copyright description field statically
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/9636/1/src/osmo-msc/msc_main.c
File src/osmo-msc/msc_main.c:

https://gerrit.osmocom.org/#/c/9636/1/src/osmo-msc/msc_main.c@74
PS1, Line 74: const char * const
> maybe it's the const * const which is creating the compiler error?
Nope, If I use "static const char *osmomsc_copyright" here, I get in gcc 8.1.0:

/home/pespin/dev/sysmocom/git/osmo-msc/src/osmo-msc/msc_main.c:319:15: error: initializer element is not constant
  .copyright = osmomsc_copyright,
               ^~~~~~~~~~~~~~~~~
/home/pespin/dev/sysmocom/git/osmo-msc/src/osmo-msc/msc_main.c:319:15: note: (near initialization for ‘msc_vty_info.copyright’)


So I guess it's a bug in older gcc versions and that's why we set it in main() instead.

Another solution I think I saw in osmo-bsc, is to set the text directly in "static struct vty_app_info msc_vty_info = {":
...
.copyright = "
HERE THE ENTIRE COPYRIGHT TEXT
",
...

That works.



-- 
To view, visit https://gerrit.osmocom.org/9636
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I432990624e7c375e29ef57998691327bffc89227
Gerrit-Change-Number: 9636
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-CC: Harald Welte <laforge at gnumonks.org>
Gerrit-Comment-Date: Fri, 15 Jun 2018 15:00:14 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180615/79893c01/attachment.htm>


More information about the gerrit-log mailing list