Skip to content

Commit f012319

Browse files
committed
vmodtool: make vcs_version static & move attribute to a better place
Reported by Flexelint. Ref c8c016d
1 parent ab78f46 commit f012319

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/libvcc/vmodtool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,8 +1244,8 @@ def vmod_data(self, fo):
12441244
vcs = json.dumps(self.vcs())
12451245
vmd = "Vmod_%s_Data" % self.modname
12461246
fo.write('\n')
1247-
fo.write('__attribute__((section(".vmod_vcs"), used))\n')
1248-
fo.write('const char vmod_vcs[] = %s;' % vcs)
1247+
fo.write('static const char vmod_vcs[] ')
1248+
fo.write('__attribute__((section(".vmod_vcs"), used)) = %s;\n' % vcs)
12491249
for i in (714, 759, 765):
12501250
fo.write("/*lint -esym(%d, %s) */\n" % (i, vmd))
12511251
fo.write("\nextern const struct vmod_data %s;\n" % vmd)

0 commit comments

Comments
 (0)