From 33ee4118483111876c00e68004bc50674992eda2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 2 Jun 2015 08:28:10 +0200 Subject: checksrc: detect fopen() for text without the FOPEN_* macros Follow-up to e8423f9ce150 with discussionis in https://github.com/bagder/curl/pull/258 This check scans for fopen() with a mode string without 'b' present, as it may indicate that an FOPEN_* define should rather be used. --- lib/checksrc.whitelist | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/checksrc.whitelist') diff --git a/lib/checksrc.whitelist b/lib/checksrc.whitelist index da7b75dc0..e261b9da1 100644 --- a/lib/checksrc.whitelist +++ b/lib/checksrc.whitelist @@ -4,3 +4,7 @@ 150 Opening ASCII mode data connection for [file] (0.0.0.0,0) (545 bytes) * no_proxy=domain1.dom,host.domain2.dom Default values are (0,0) initialized by calloc. + file = fopen(name, "r"); /* VMS */ + return fopen(file, "r"); /* VMS */ + return fopen(file, "r", "rfm=stmlf", "ctx=stm"); + curl_memlog("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n", -- cgit v1.2.3