ref: 3244f11cfea73fae818df915e5418f56f9a5cd7c
parent: 7d5e88ffda54ae41ef0030140debc0bc34a9eeb7
parent: 3422d3b976c1d0d9f87ee7bf1ec2d17d629108aa
author: huili2 <huili2@cisco.com>
date: Mon Jan 5 04:42:43 EST 2015
Merge pull request #1696 from mstorsjo/add-header-const Declare the g_strCodecVer variable as const
--- a/codec/api/svc/codec_ver.h
+++ b/codec/api/svc/codec_ver.h
@@ -5,7 +5,7 @@
#include "codec_app_def.h"
static const OpenH264Version g_stCodecVersion = {1,3,0,0};
-static const char* g_strCodecVer = "OpenH264 version:1.3.0.0";
+static const char* const g_strCodecVer = "OpenH264 version:1.3.0.0";
#define OPENH264_MAJOR (1)
#define OPENH264_MINOR (3)
--- a/codec/build/generate_codec_ver.sh
+++ b/codec/build/generate_codec_ver.sh
@@ -28,11 +28,11 @@
echo "" >>codec_ver.h
echo "static const OpenH264Version g_stCodecVersion = {$1};"|tr '.' ',' >>codec_ver.h
-echo "static const char* g_strCodecVer = \"OpenH264 version:$1\";" >>codec_ver.h
+echo "static const char* const g_strCodecVer = \"OpenH264 version:$1\";" >>codec_ver.h
#if [ "$2"x = ""x ]; then
-#echo "static const char* g_strCodecBuildNum = \"OpenH264 revision:$revision\";" >> codec_ver.h
+#echo "static const char* const g_strCodecBuildNum = \"OpenH264 revision:$revision\";" >> codec_ver.h
#else
-#echo "static const char* g_strCodecBuildNum = \"OpenH264 build:$2, OpenH264 revision:$revision\";" >> codec_ver.h
+#echo "static const char* const g_strCodecBuildNum = \"OpenH264 build:$2, OpenH264 revision:$revision\";" >> codec_ver.h
#fi
echo "" >>codec_ver.h
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -1228,7 +1228,6 @@
}
OpenH264Version WelsGetCodecVersion() {
- (void) g_strCodecVer; // Avoid warnings about unused static variables
return g_stCodecVersion;
}