summaryrefslogtreecommitdiff
path: root/dpkg-deb/main.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-04-09 20:28:48 +0200
committerGuillem Jover <guillem@debian.org>2014-04-21 16:54:29 +0200
commit07413972ae2ff9fafc08d862e4ed05985f182a5f (patch)
tree1c8c86b57f9eab885683cf99952af6f9b2e2372a /dpkg-deb/main.c
parent639786e29c72baf6b1f0b2ca1cada34df54d8dff (diff)
downloaddpkg-07413972ae2ff9fafc08d862e4ed05985f182a5f.tar.gz
libdpkg, dpkg-deb: Fix compound literal usage with C99 compilers
We cannot portably assign a compound literal to a static variable, as the expression is not constant. GCC accepts these for backwards compatibility in its C89 mode, but not in its C99 mode.
Diffstat (limited to 'dpkg-deb/main.c')
-rw-r--r--dpkg-deb/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c
index 7c941ceb1..15edd223e 100644
--- a/dpkg-deb/main.c
+++ b/dpkg-deb/main.c
@@ -166,7 +166,7 @@ set_deb_format(const struct cmdinfo *cip, const char *value)
static void
set_deb_old(const struct cmdinfo *cip, const char *value)
{
- deb_format = DEB_VERSION(0, 939000);
+ deb_format = DEB_VERSION_OBJECT(0, 939000);
warning(_("obsolete option '--%s'; please use '--%s' instead"),
cip->olong, "deb-format=0.939000");
@@ -175,7 +175,7 @@ set_deb_old(const struct cmdinfo *cip, const char *value)
static void
set_deb_new(const struct cmdinfo *cip, const char *value)
{
- deb_format = DEB_VERSION(2, 0);
+ deb_format = DEB_VERSION_OBJECT(2, 0);
warning(_("obsolete option '--%s'; please use '--%s' instead"),
cip->olong, "deb-format=2.0");