Announcement

Collapse
No announcement yet.

Vanilla Quake 1.06 compiler warnings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vanilla Quake 1.06 compiler warnings

    If I attempt to compile vanilla 1.06 code with the recent win64-fteqccgui.exe, I got 103 warnings. With my own current project, I have a lot of the same warnings (but more of them). At a glance, some of these look like legitimate issues that may have gone undetected in vanilla Quake all this time.

    However, I'm trying to figure out which of these should perhaps be fixed, and which should be ignored as they apply to my own code as well.

    ai.qc:302: warning F210: Sound "vomitus/v_sight1.wav" was used but not directly precached - This seems like a legit vanilla bug. If I attempt to precache it, it says the file does not exist.

    fight.qc:299: warning F306: Local "enemy_yaw" hides global with same name and type - enemy_yaw is defined locally and globally in the same file. This seems like an oversight.

    ai.qc:368: warning Q203: 'FindTarget' returned nothing, expected float
    ai.qc:588: warning Q203: 'CheckAnyAttack' returned nothing, expected float

    weapons.qc:92: warning Q207: org duplicate definition ignored

    misc.qc:179: warning Q205: Statement does not do anything

    knight.qc:32: warning: Duplicate macro defined (attackb1)
    oldone.qc:29: warning: Duplicate macro defined (shake12)

    enforcer.qc:76: warning Q207: vec duplicate definition ignored

    defs.qc:401: warning Q302: float empty_float no references.
    fight.qc:298: warning Q302: float chance no references.
    fight.qc:299: warning Q302: float enemy_yaw no references.
    ai.qc:37: warning Q302: float current_yaw no references.
    ai.qc:476: warning Q302: vector mtemp no references.
    ai.qc:476: warning Q302: float mtemp_x no references.
    ai.qc:476: warning Q302: float mtemp_y no references.
    ai.qc:476: warning Q302: float mtemp_z no references.
    ai.qc:679: warning Q302: vector delta no references.
    ai.qc:679: warning Q302: float delta_x no references.
    note: suppressed 68 more warnings about unreferenced variables, as you clearly don't care about the first 10.

    client.qc:507: warning F307: type mismatch: void() player_pain to void(entity attacker, float damage) self.th_pain - I've got a bunch of these
    doors.qc:581: warning F307: type mismatch: void() SUB_Null to void(entity attacker, float damage) self.th_pain
    doors.qc:668: warning F307: type mismatch: void() fd_secret_use to void(entity attacker, float damage) self.th_pain
    doors.qc:772: warning F307: type mismatch: void() fd_secret_use to void(entity attacker, float damage) self.th_pain
    dog.qc:357: warning F307: type mismatch: void() dog_pain to void(entity attacker, float damage) self.th_pain
    shalrath.qc:233: warning F307: type mismatch: void() shalrath_pain to void(entity attacker, float damage) self.th_pain
    oldone.qc:277: warning F307: type mismatch: void() nopain to void(entity attacker, float damage) self.th_pain

    subs.qc:25: warning Q206: SetMovedir: not all control paths return a value - I've got a bunch of these that a glance appear to be benign
    client.qc:134: warning Q206: FindIntermission: not all control paths return a value
    wizard.qc:180: warning Q206: WizardAttackFinished: not all control paths return a value

    items.qc:47: warning Q105: too few parameters on call to droptofloor - I have tons of these as well
    monsters.qc:75: warning Q105: too few parameters on call to droptofloor
    misc.qc:249: warning Q105: too few parameters on call to droptofloor
    misc.qc:281: warning Q105: too few parameters on call to droptofloor
    misc.qc:536: warning Q105: too few parameters on call to makestatic
    ogre.qc:249: warning Q105: too few parameters on call to ai_charge

  • #2
    @no references

    that just means that var is not doing anything

    @expect TYPE return

    put a return at the end of the function followed by the expected value or a var of that value.

    @type mismatch
    looks like you are trying to put things in the function interface which do not belong.
    http://www.nextgenquake.com

    Comment


    • #3
      Originally posted by MadGypsy View Post
      @no references

      that just means that var is not doing anything

      @expect TYPE return

      put a return at the end of the function followed by the expected value or a var of that value.

      @type mismatch
      looks like you are trying to put things in the function interface which do not belong.
      Thanks. I assume it is then safe to strip the var declarations not being used.

      For the expect examples, they were returning nothing currently and I wasn't sure what the original intent was for which value to return.

      As for the type mismatches, these are in vanilla code, and then there are bunch more added in SMC code (which I'm working with for a bit of a fork). I think most (if not all) are caused by calls like this.

      self.th_pain = player_pain;

      self.th_pain expects two values to be passed, where as player_pain has none. I'm not sure how to fix that.

      Comment


      • #4
        you are correct on all accounts

        as for the last part, you are also probably correct and using = instead of actually calling the function is just weird. I have a completely clean qc somewhere. I could find it for you if you like.
        Last edited by MadGypsy; 02-13-2017, 12:20 PM.
        http://www.nextgenquake.com

        Comment


        • #5
          Originally posted by MadGypsy View Post
          you are correct on all accounts

          as for the last part, you are also probably correct and using = instead of actually callung the function is just weird. I have a completely clean qc somewhere. I could find it for you if you like.
          I'd be curious to find it if it isn't any trouble. In this very subforum someone linked to a Clean QuakeC. Compiling with the latest win64-fteqccgui.exe returns 3 warnings instead of 103 with vanilla. So I'm going to start digging into the differences and how they cleaning some of the warnings.

          Comment


          • #6
            Vanilla progs has 80-something warnings (87 I think?). They are all minor and totally fixable. I've done this already. I'd give you a copy of my own clean QC (I organized the shit out of it) but I changed it up quite a bit and there may be a few unforseen effects. Still play testing. (I also removed a lot of comments that I personally didn't need).

            The bugs in vanilla progs that suck the most are the ones that don't trip a warning (like the double-monster-count fish bug, the megahealth rot entity, the traceattack on multiple targets shotgun bug, etc.).
            'Replacement Player Models' Project

            Comment


            • #7
              Have you used this as a reference?

              https://gitlab.com/quakec-v1-01-clea...an/tree/master

              It is my understanding that they cleaned up most the compile warnings/errors in it.

              / Add: Baker -1. Looks like you already keyed in that and plan on doing that WinMerge is an incredibly easy graphical comparison tool you could you to compare the 2 source codes and see what changes they did.
              Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

              So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

              Comment


              • #8
                Originally posted by Baker View Post
                Have you used this as a reference?

                https://gitlab.com/quakec-v1-01-clea...an/tree/master

                It is my understanding that they cleaned up most the compile warnings/errors in it.

                / Add: Baker -1. Looks like you already keyed in that and plan on doing that WinMerge is an incredibly easy graphical comparison tool you could you to compare the 2 source codes and see what changes they did.
                I did just discover that and I plan on going over that tonight!

                Originally posted by Dutch View Post
                The bugs in vanilla progs that suck the most are the ones that don't trip a warning (like the double-monster-count fish bug, the megahealth rot entity, the traceattack on multiple targets shotgun bug, etc.).
                I would greatly appreciate any information on vanilla bugs that don't trip warnings. I want to make sure I'm not including those bugs in my code.

                Thanks!

                Comment


                • #9
                  Here's a link to a thread I started trying to track down an old list of vanilla bugs:

                  Bug List Thread

                  Baker was kind enough to assist.
                  'Replacement Player Models' Project

                  Comment


                  • #10
                    Originally posted by Dutch View Post
                    Here's a link to a thread I started trying to track down an old list of vanilla bugs:

                    Bug List Thread

                    Baker was kind enough to assist.
                    Awesome! Thank you both. I have some homework now.

                    Comment

                    Working...
                    X