浏览代码

libobs: Fix windows warnings with C library macro

The macro INFINITY apparently will trigger a warning with microsoft's
compiler despite being a C standard library macro.
jp9000 11 年之前
父节点
当前提交
e3e79dcdc5
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      libobs/obs-audio-controls.c

+ 7 - 0
libobs/obs-audio-controls.c

@@ -24,6 +24,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 #include "obs-audio-controls.h"
 #include "obs-audio-controls.h"
 
 
+/* These are pointless warnings generated not by our code, but by a standard
+ * library macro, INFINITY */
+#ifdef _MSC_VER
+#pragma warning(disable : 4056)
+#pragma warning(disable : 4756)
+#endif
+
 typedef float (*obs_fader_conversion_t)(const float val);
 typedef float (*obs_fader_conversion_t)(const float val);
 
 
 struct obs_fader {
 struct obs_fader {