BoraY:
Yet still, despite my poor knowledge, I can manage to write moderate level code that passes the compiler without any warnings and it is very annoying to see tons of warnings that are all generating from the library code.
I agree. It's a huge pet peeve of mine. I think it is often caused by the library author not having warnings turned on. The Arduino IDE actually promotes that because its default setting is to have them off. It's sad because warnings can be so incredibly useful to a developer. So many times I have had a warning tip me off to a problem in my code that would have taken a long time to find otherwise.
BoraY:
I thought at least some of these must be because of my LCD declaration having some missing/wrong parameters.
Nope.
BoraY:
I would still appreciate somebody taking time to read them and guide me to correct things I may be doing wrong.
They are all quite self-explanatory. As I said already, none of them are caused by anything you are doing wrong. This is the reason why the Arduino developers have warnings turned off by default. They tend to completely freak out beginners who can't understand the difference between a warning and an error.
BoraY:
As far as I know, this is a very common library that is written to cover quite an extensive range of character LCD displays and their protocols. This just can't be happening to everyone who uses this library, very very annoying...
Note that there are quite a few different libraries that contain a file named LiquidCrystal_I2C.h. Some of them have a different API than others, which could explain why you see some code for libraries of this name with a different style of constructor. You might find that the library you happened to grab is outdated or written by a developer who doesn't know what they are doing, whereas another version is very high quality and has no warnings. I know that many people recommend a completely different library for the I2C displays:
It does have a somewhat different API, and is a bit more complex, but you shouldn't have too much trouble adapting your code to it after studying the examples. Although I have used several, I can't give a good comparison between the various libraries for the I2C LCDs because I haven't spend any time checking which was best, since I've only used the LCDs in a couple of projects of friends where I was only giving them a little help.
If you really are bothered by these warnings, and are set on using this particular library, feel free to fix the code. The "unused parameter" warnings are fairly self explanatory. Perhaps the developer has a parameter in the function signature, but then never ended up using it in the code, or maybe they have an #ifdef sort of thing in the code that causes the parameter to only be used depending on whether a macro is defined. One solution would be to remove the unused parameter, but that will mean you have changed the signature of the function, which might cause problems if there is code that tries to pass an argument to the function. The other trick for fixing this warning, with no overhead is to cast the variable to void in the function. For example, you have this warning:
C:\Program Files (x86)\Arduino\libraries\NewLiquidCrystal/LCD.h: In function 'void waitUsec(uint16_t)':
C:\Program Files (x86)\Arduino\libraries\NewLiquidCrystal/LCD.h:101:40: warning: unused parameter 'uSec' [-Wunused-parameter]
inline static void waitUsec ( uint16_t uSec )
So you would want to add this line to the waitUsec function:
(void)uSec; // fix "unused parameter" warning
That will cause the compiler to think the parameter was used, but it is used in a way that does nothing and thus incurs no overhead. Since this is not obvious from reading the code, I recommend adding a comment to explain the purpose of this strange line.
Then you just need to go through and do the same for the many other "unused parameter" warnings.
After that, there is only one other warning left:
In file included from C:\Program Files (x86)\Arduino\libraries\NewLiquidCrystal\LiquidCrystal_SR1W.cpp:48:0:
C:\Program Files (x86)\Arduino\libraries\NewLiquidCrystal\LiquidCrystal_SR1W.h:168:1: warning: multi-line comment [-Wcomment]
// | | 0.1uF | \
^
The escape character at the end of the single line comment causes the next line to also be a part of the comment. It is common for beginners to try to make their code pretty by "balancing" the single line comment like this:
// my comment is so pretty now that it breaks my code! \\
void brokenFunction() {
it ends up making a line of the code that was never intended to be a comment in to a comment.
In the case of the library, this escape character was used to intentionally create a multi-line comment using the single-line comment syntax. We have a different syntax for that though, the block comment syntax (/* */). So you could fix this warning by converting the comment to use the block comment syntax.