Commit 671a9ec1 authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Fixed printf() format warnings.

parent 0bd3938b
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
#define QCALLOC(ptr, typ, nel) \ #define QCALLOC(ptr, typ, nel) \
{if (!(ptr = (typ *)calloc((size_t)(nel),sizeof(typ)))) \ {if (!(ptr = (typ *)calloc((size_t)(nel),sizeof(typ)))) \
{ \ { \
sprintf(gstr, #ptr " (" #nel "=%lld elements) " \ sprintf(gstr, #ptr " (" #nel "=%zd elements) " \
"at line %d in module " __FILE__ " !", \ "at line %d in module " __FILE__ " !", \
(size_t)(nel)*sizeof(typ), __LINE__); \ (size_t)(nel)*sizeof(typ), __LINE__); \
error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\ error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
#define QMALLOC(ptr, typ, nel) \ #define QMALLOC(ptr, typ, nel) \
{if (!(ptr = (typ *)malloc((size_t)(nel)*sizeof(typ)))) \ {if (!(ptr = (typ *)malloc((size_t)(nel)*sizeof(typ)))) \
{ \ { \
sprintf(gstr, #ptr " (" #nel "=%lld elements) " \ sprintf(gstr, #ptr " (" #nel "=%zd elements) " \
"at line %d in module " __FILE__ " !", \ "at line %d in module " __FILE__ " !", \
(size_t)(nel)*sizeof(typ), __LINE__); \ (size_t)(nel)*sizeof(typ), __LINE__); \
error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\ error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
#define QMALLOC16(ptr, typ, nel) \ #define QMALLOC16(ptr, typ, nel) \
{if (posix_memalign((void **)&ptr, 16, (size_t)(nel)*sizeof(typ))) \ {if (posix_memalign((void **)&ptr, 16, (size_t)(nel)*sizeof(typ))) \
{ \ { \
sprintf(gstr, #ptr " (" #nel "=%lld elements) " \ sprintf(gstr, #ptr " (" #nel "=%zd elements) " \
"at line %d in module " __FILE__ " !", \ "at line %d in module " __FILE__ " !", \
(size_t)(nel)*sizeof(typ), __LINE__); \ (size_t)(nel)*sizeof(typ), __LINE__); \
error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\ error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
#define QREALLOC(ptr, typ, nel) \ #define QREALLOC(ptr, typ, nel) \
{if (!(ptr = (typ *)realloc(ptr, (size_t)(nel)*sizeof(typ))))\ {if (!(ptr = (typ *)realloc(ptr, (size_t)(nel)*sizeof(typ))))\
{ \ { \
sprintf(gstr, #ptr " (" #nel "=%lld elements) " \ sprintf(gstr, #ptr " (" #nel "=%zd elements) " \
"at line %d in module " __FILE__ " !", \ "at line %d in module " __FILE__ " !", \
(size_t)(nel)*sizeof(typ), __LINE__); \ (size_t)(nel)*sizeof(typ), __LINE__); \
error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\ error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
{if (ptrin) \ {if (ptrin) \
{if (!(ptrout = (typ *)malloc((size_t)(nel)*sizeof(typ)))) \ {if (!(ptrout = (typ *)malloc((size_t)(nel)*sizeof(typ)))) \
{ \ { \
sprintf(gstr, #ptrout " (" #nel "=%lld elements) " \ sprintf(gstr, #ptrout " (" #nel "=%zd elements) " \
"at line %d in module " __FILE__ " !", \ "at line %d in module " __FILE__ " !", \
(size_t)(nel)*sizeof(typ), __LINE__); \ (size_t)(nel)*sizeof(typ), __LINE__); \
error(EXIT_FAILURE,"Could not allocate memory for ",gstr);\ error(EXIT_FAILURE,"Could not allocate memory for ",gstr);\
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* This file part of: SExtractor * This file part of: SExtractor
* *
* Copyright: (C) 2007-2017 IAP/CNRS/UPMC * Copyright: (C) 2007-2022 IAP/CNRS/SorbonneU
* *
* License: GNU General Public License * License: GNU General Public License
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
* *
* Last modified: 19/06/2017 * Last modified: 07/09/2022
* *
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#define QFFTWF_MALLOC(ptr, typ, nel) \ #define QFFTWF_MALLOC(ptr, typ, nel) \
{if (!(ptr = (typ *)fftwf_malloc((size_t)(nel)*sizeof(typ)))) \ {if (!(ptr = (typ *)fftwf_malloc((size_t)(nel)*sizeof(typ)))) \
{ \ { \
sprintf(gstr, #ptr " (" #nel "=%lld elements) " \ sprintf(gstr, #ptr " (" #nel "=%zd elements) " \
"at line %d in module " __FILE__ " !", \ "at line %d in module " __FILE__ " !", \
(size_t)(nel)*sizeof(typ), __LINE__); \ (size_t)(nel)*sizeof(typ), __LINE__); \
error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\ error(EXIT_FAILURE, "Could not allocate memory for ", gstr);\
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment