This is going to be a strange request. I must warn that I am new to embedded programming and therefore what is obvious to you may not be to me. I am trying to implement a real time clock program with the data then being transmitted on CAN. I am getting some warning when I compile my code and cannot understand what I need to do. Any help would be appreciated. I will be posting my code in parts as I cannot exceed a certain character limit.
Try initializing time.daysb to 0 outside the function. Otherwise it will always be 0 and on a rollover time.days will always be greater. Also try ending the if-else ladder with just an else. Better way to end execution of the ladder.