Here is another patch to get rid of this warning from the compiler:

  findmicrophones.cpp:152: warning: comparison between signed and
    unsigned integer expressions

The cause is the integer fromrc being compared to the unsigned integer
returned from size(), which stay unsigned even after subtracting 1.

The else block in question is used when fromrc != -1, which I believe
also mean that it is a index into the audioVector array, ie values
from 0 and above.

Based on this assumtion, I believe the correct fix is to cast fromrc
to unsigned before comparing to ensure a correct result.

diff --git a/utilities/findmicrophones.cpp b/utilities/findmicrophones.cpp
index e368b5c..435295c 100644
--- a/utilities/findmicrophones.cpp
+++ b/utilities/findmicrophones.cpp
@@ -149,7 +149,7 @@ int main () {
         g_print("set microphoneDevice %d\n", dev_select);
     } else {
         numdevs = findAudioDevs(audioVector);
-        if (fromrc <= (audioVector.size() - 1)) {
+        if ((unsigned int)fromrc <= (audioVector.size() - 1)) {
             g_print("\nThe gnashrc file reports default microphone is set 
to:\n"
             g_print("%s (%s)\n", audioVector[fromrc]->deviceName,
                 audioVector[fromrc]->deviceType);

Happy hacking,
-- 
Petter Reinholdtsen

_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to