warnings

Assignment makes pointer from integer without cast

耗尽温柔 提交于 2020-01-18 04:59:43
问题 Coming from a Java background I'm learning C, but I find those vague compiler error messages increasingly frustrating. Here's my code: /* * PURPOSE * Do case-insensetive string comparison. */ #include <stdio.h> #include <string.h> #include <ctype.h> int compareString(char cString1[], char cString2[]); char strToLower(char cString[]); int main() { // Declarations char cString1[50], cString2[50]; int isEqual; // Input puts("Enter string 1: "); gets(cString1); puts("Enter string 2: "); gets

Assignment makes pointer from integer without cast

两盒软妹~` 提交于 2020-01-18 04:58:45
问题 Coming from a Java background I'm learning C, but I find those vague compiler error messages increasingly frustrating. Here's my code: /* * PURPOSE * Do case-insensetive string comparison. */ #include <stdio.h> #include <string.h> #include <ctype.h> int compareString(char cString1[], char cString2[]); char strToLower(char cString[]); int main() { // Declarations char cString1[50], cString2[50]; int isEqual; // Input puts("Enter string 1: "); gets(cString1); puts("Enter string 2: "); gets

Why does float64 produce a RuntimeWarning where float produces a nan?

泪湿孤枕 提交于 2020-01-17 05:39:06
问题 I'm using the warnings module to raise warnings as errors. When I call my function plot_fig_4 , I get the following error: In [5]: plot_amit.plot_fig_4() g: 1 of 3 theta_E: 1 of 1000 --------------------------------------------------------------------------- RuntimeWarning Traceback (most recent call last) <ipython-input-5-5a631d2493d7> in <module>() ----> 1 plot_amit.plot_fig_4() /home/dan/Science/dopa_net/plot_amit.pyc in plot_fig_4() 130 tau_0, tau, 131 theta_E_, --> 132 H) 133 134 #

Suppressing warning: comparison is always false due to limited scope of data type

纵然是瞬间 提交于 2020-01-16 17:35:13
问题 I have a templated function for returning the number of digits in a number: template <typename R> static inline unsigned count(const R num) { if(num < 10) return 1; else if (num < 100) return 2; else if (num < 1000) return 3; else if (num < 10000) return 4; else if (num < 100000) return 5; else if (num < 1000000) return 6; else if (num < 10000000) return 7; else if (num < 100000000) return 8; else if (num < 1000000000) return 9; else if (num < 10000000000ULL) return 10; else if (num <

MySQL 8 Warning: SQL_NO_CACHE is deprecated

邮差的信 提交于 2020-01-16 14:04:07
问题 When issuing a statement to MySQL8 server: SELECT SQL_NO_CACHE * FROM <table-name>; I get this warning: Warning, 1681, 'SQL_NO_CACHE' is deprecated and will be removed in a future release. I would like to ask if there is any successor of the SQL_NO_CACHE that works or is planned to work with MySQL 8.x? Does SQL_NO_CACHE actually work with MySQL 8.x or it is omitted by the server? 来源: https://stackoverflow.com/questions/58584596/mysql-8-warning-sql-no-cache-is-deprecated

R c.Date() raises warning Calling 'structure(NULL, *)' is deprecated

元气小坏坏 提交于 2020-01-16 08:57:07
问题 I noticed that calling c.Date() to initialize an empty date vector raises a Warning. I am on R version 3.4.0. The warning message is : Warning message: In structure(c(unlist(lapply(list(...), unclass))), class = "Date") : Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes. Consider 'structure(list(), *)' instead. Do anyone has an explantion? How to initialize an empty DATE vector without having this warning? A reproducible code : vect = c.Date() d = as.Date("31/12/2018

Warnings in boost::priority_queue

丶灬走出姿态 提交于 2020-01-15 12:23:29
问题 When I try to build "priority_queue_example.cpp" it get these warnings(and so errors) pointing to "priority_queue_example.h" on the line where my priority_queue is declared. The warnings are, 1> priority_queue_example.cpp 1>c:\Projects\lib\boost\boost\heap\detail\stable_heap.hpp(102): error C2220: warning treated as error - no 'object' file generated 1>c:\Projects\lib\boost\boost\heap\detail\stable_heap.hpp(102): warning C4100: 'rhs' : unreferenced formal parameter 1> c:\Projects\lib\boost

Warning: Creating default object from empty value (typical solution not solving issue)

℡╲_俬逩灬. 提交于 2020-01-15 09:53:08
问题 NOTE: I've read the other topics on stackoverflow about how to solve this issue: Creating default object from empty value in PHP? For some reason I still get the Warning message: Creating default object from empty value I've tried a few things to fix the warning: $data = new stdClass(); $data->result->complex->first_key = $old_data->result->complex; also tried: $data->result->complex = new stdClass(); $data->result->complex->first_key = $old_data->result->complex; Still get the warning:

Get rid of Julia's `WARNING: redifining constant` for strings that are not changed?

*爱你&永不变心* 提交于 2020-01-15 04:49:08
问题 In my julia code I am using some constants. Some of these constants are strings (they serve as identifiers). My issues is that whenever I run a julia script, I always get the following warning for constant strings, even when I do not change the constants : WARNING: redefining constant pot_type To illustrate my problem, here is a MWE: const pot_type = "constant" const b = 12 println("Given parameters: Potential = $pot_type, b = $b .") If I run this script two times, I will get the

Ifort suppress unused variable warning, leave all others intact

两盒软妹~` 提交于 2020-01-14 12:58:08
问题 i use ifort and gfortran to compile my Fortran program. However i also use a coworkers source and he has got a lot of unused variables. How can i suppress these for the compile, seeing as they are not really an error? However i dont want to disable -pedantic and -stan in the compiler options and thus want all the other warnings. cheers and thanks for the help 回答1: With ifort try -warn [no]unused . And, while I'm here, I suggest you remove unused variables. The compiler may not regard them as