foo.cc: In function 'void dts::main()':
foo.cc:152:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0;i<x.size();i++)
~^~~~~~~~~
foo.cc:157:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (i<x.size())
~^~~~~~~~~
foo.cc: In function 'int dts::search(int)':
foo.cc:131:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
foo.cc: In function 'void dts::main()':
foo.cc:135:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&q);
~~~~~^~~~~~~~~~~~~~
foo.cc:139:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&ctl[i]);
~~~~~^~~~~~~~~~~~~~
foo.cc:141:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&pos[i],&val[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:143:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&val[i]);
~~~~~^~~~~~~~~~~~~~
foo.cc:145:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&pos[i]);
~~~~~^~~~~~~~~~~~~~
foo.cc:168:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&t);
~~~~~^~~~~~~~~
foo.cc:170:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&a[i],&b[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~